New function: eraseData

This commit is contained in:
2023-11-09 20:50:20 +01:00
parent a43b7763fc
commit ef791f4ab5
3 changed files with 11 additions and 3 deletions
+8
View File
@@ -52,6 +52,14 @@ void ER1400::writeData(int adr, int data)
write();
}
// eraseData (acceptAddress -> erase -> write)
void ER1400::eraseData(int adr)
{
acceptAddress(adr);
erase();
write();
}
// STANDBY (C1: 0, C2: 0, C3: 0)
void ER1400::standby()
{
+2
View File
@@ -37,6 +37,8 @@ public:
int readData(int adr);
// writeData (acceptAddress -> erase -> acceptData -> write)
void writeData(int adr, int data);
// eraseData (acceptAddress -> erase -> write)
void eraseData(int adr);
// STANDBY (C1: 0, C2: 0, C3: 0)
void standby();
+1 -3
View File
@@ -24,9 +24,7 @@ void setup()
for (i = 0; i < 100; i++)
{
// Erease the information on position i
er1400.acceptAddress(i);
er1400.erase();
er1400.write();
er1400.eraseData(i);
}
}