Fix previous commit, deinit screens on ARM9 exception, add check for write protect switch on writing operations

This commit is contained in:
Aurora Wright
2017-08-28 02:40:05 +02:00
parent 2a6a655804
commit 618ce671ac
8 changed files with 36 additions and 29 deletions

View File

@@ -116,7 +116,10 @@ void __attribute__((noreturn)) mainHandler(u32 *regs, u32 type)
//Copy header (actually optimized by the compiler)
*(ExceptionDumpHeader *)FINAL_BUFFER = dumpHeader;
i2cWriteRegister(I2C_DEV_MCU, 0x22, 1 << 0); //Shutdown LCD
((void (*)())0xFFFF0830)(); //Ensure that all memory transfers have completed and that the data cache has been flushed
i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 2); //Reboot
while(true);
}