Better to reboot here
This commit is contained in:
parent
fea5a111a9
commit
c60ef7fe82
@ -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();
|
||||
}
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
}
|
@ -9,5 +9,6 @@
|
||||
#include "types.h"
|
||||
|
||||
u32 waitInput(void);
|
||||
void shutDown(void);
|
||||
void mcuShutDown(void);
|
||||
void mcuReboot(void);
|
||||
void error(const char *message);
|
Reference in New Issue
Block a user