diff --git a/source/config.c b/source/config.c index 50bc1bd..af1211e 100644 --- a/source/config.c +++ b/source/config.c @@ -9,7 +9,6 @@ #include "screeninit.h" #include "draw.h" #include "fs.h" -#include "i2c.h" #include "buttons.h" void configureCFW(const char *configPath) @@ -181,7 +180,5 @@ void configureCFW(const char *configPath) //Zero the last booted FIRM flag CFG_BOOTENV = 0; - //Reboot - i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 2); - while(1); + mcuReboot(); } \ No newline at end of file diff --git a/source/firm.c b/source/firm.c index 300e949..93248fe 100755 --- a/source/firm.c +++ b/source/firm.c @@ -55,7 +55,7 @@ void main(void) //Determine if this is a firmlaunch boot if(*(vu8 *)0x23F00005) { - if(needConfig == 2) shutDown(); + if(needConfig == 2) mcuReboot(); bootType = 1; diff --git a/source/utils.c b/source/utils.c index 01c1b56..73e796d 100644 --- a/source/utils.c +++ b/source/utils.c @@ -37,12 +37,18 @@ u32 waitInput(void) return key; } -void shutDown(void) +void mcuShutDown(void) { i2cWriteRegister(I2C_DEV_MCU, 0x20, 1); while(1); } +void mcuReboot(void) +{ + i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 2); + while(1); +} + void error(const char *message) { initScreens(); @@ -53,5 +59,5 @@ void error(const char *message) waitInput(); - shutDown(); + mcuShutDown(); } \ No newline at end of file diff --git a/source/utils.h b/source/utils.h index 042fa72..e97f0c4 100644 --- a/source/utils.h +++ b/source/utils.h @@ -9,5 +9,6 @@ #include "types.h" u32 waitInput(void); -void shutDown(void); +void mcuShutDown(void); +void mcuReboot(void); void error(const char *message); \ No newline at end of file