From 5f295c4227aa8a472dc46e7dab20223514a8db9a Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sun, 7 Apr 2019 16:13:14 +0200 Subject: [PATCH] increase i2c timeout --- arm9/source/screen.c | 1 + arm9/source/utils.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arm9/source/screen.c b/arm9/source/screen.c index 2bb4275..a787832 100644 --- a/arm9/source/screen.c +++ b/arm9/source/screen.c @@ -104,6 +104,7 @@ void initScreens(void) //Turn on backlight I2C_writeReg(I2C_DEV_MCU, 0x22, 0x2A); + wait(5); } else updateBrightness(MULTICONFIG(BRIGHTNESS)); diff --git a/arm9/source/utils.c b/arm9/source/utils.c index 38f81ba..38fb640 100644 --- a/arm9/source/utils.c +++ b/arm9/source/utils.c @@ -89,12 +89,12 @@ u32 waitInput(bool isMenu) if(shouldShellShutdown) { u8 shellState = I2C_readReg(I2C_DEV_MCU, 0xF); - wait(3); + wait(5); if(!(shellState & 2)) mcuPowerOff(); } u8 intStatus = I2C_readReg(I2C_DEV_MCU, 0x10); - wait(3); + wait(5); if(intStatus & 1) mcuPowerOff(); //Power button pressed oldKey = 0;