New function: eraseData
This commit is contained in:
@@ -52,6 +52,14 @@ void ER1400::writeData(int adr, int data)
|
|||||||
write();
|
write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eraseData (acceptAddress -> erase -> write)
|
||||||
|
void ER1400::eraseData(int adr)
|
||||||
|
{
|
||||||
|
acceptAddress(adr);
|
||||||
|
erase();
|
||||||
|
write();
|
||||||
|
}
|
||||||
|
|
||||||
// STANDBY (C1: 0, C2: 0, C3: 0)
|
// STANDBY (C1: 0, C2: 0, C3: 0)
|
||||||
void ER1400::standby()
|
void ER1400::standby()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ public:
|
|||||||
int readData(int adr);
|
int readData(int adr);
|
||||||
// writeData (acceptAddress -> erase -> acceptData -> write)
|
// writeData (acceptAddress -> erase -> acceptData -> write)
|
||||||
void writeData(int adr, int data);
|
void writeData(int adr, int data);
|
||||||
|
// eraseData (acceptAddress -> erase -> write)
|
||||||
|
void eraseData(int adr);
|
||||||
|
|
||||||
// STANDBY (C1: 0, C2: 0, C3: 0)
|
// STANDBY (C1: 0, C2: 0, C3: 0)
|
||||||
void standby();
|
void standby();
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ void setup()
|
|||||||
for (i = 0; i < 100; i++)
|
for (i = 0; i < 100; i++)
|
||||||
{
|
{
|
||||||
// Erease the information on position i
|
// Erease the information on position i
|
||||||
er1400.acceptAddress(i);
|
er1400.eraseData(i);
|
||||||
er1400.erase();
|
|
||||||
er1400.write();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user