From 1d21a0fe4ca12a0f95403f72c6f37d7e95781058 Mon Sep 17 00:00:00 2001 From: Robz8 Date: Wed, 7 Jun 2017 10:39:20 -0600 Subject: [PATCH] When we're saving, power button does nothing, in order to prevent corruption. --- cardengine_arm7/source/cardEngine.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cardengine_arm7/source/cardEngine.c b/cardengine_arm7/source/cardEngine.c index 662b1ff8c..c047961ad 100644 --- a/cardengine_arm7/source/cardEngine.c +++ b/cardengine_arm7/source/cardEngine.c @@ -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; } @@ -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; } @@ -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; }