Skip to content

Commit

Permalink
When we're saving, power button does nothing, in order to prevent cor…
Browse files Browse the repository at this point in the history
…ruption.
  • Loading branch information
RocketRobz committed Jun 7, 2017
1 parent 6be4236 commit 1d21a0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cardengine_arm7/source/cardEngine.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ bool eepromPageWrite (u32 dst, const void *src, u32 len) {
dbg_hexa(len);
#endif

i2cWriteRegister(0x4A, 0x12, 0x01); // When we're saving, power button does nothing, in order to prevent corruption.
fileWrite(src,savFile,dst,len);
i2cWriteRegister(0x4A, 0x12, 0x00); // If saved, power button works again.

return true;
}
Expand All @@ -272,7 +274,9 @@ bool eepromPageProg (u32 dst, const void *src, u32 len) {
dbg_hexa(len);
#endif

i2cWriteRegister(0x4A, 0x12, 0x01); // When we're saving, power button does nothing, in order to prevent corruption.
fileWrite(src,savFile,dst,len);
i2cWriteRegister(0x4A, 0x12, 0x00); // If saved, power button works again.

return true;
}
Expand All @@ -289,7 +293,9 @@ bool eepromPageVerify (u32 dst, const void *src, u32 len) {
dbg_hexa(len);
#endif

//i2cWriteRegister(0x4A, 0x12, 0x01); // When we're saving, power button does nothing, in order to prevent corruption.
//fileWrite(src,savFile,dst,len);
//i2cWriteRegister(0x4A, 0x12, 0x00); // If saved, power button works again.
return true;
}

Expand Down

0 comments on commit 1d21a0f

Please sign in to comment.