mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Poweroff LCD before reboot / poweroff
... fixes several MCU issues
This commit is contained in:
parent
730b88638d
commit
c60237a8c3
@ -49,7 +49,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// GodMode9 version
|
// GodMode9 version
|
||||||
#define VERSION "1.2.6"
|
#define VERSION "1.2.7"
|
||||||
|
|
||||||
// input / output paths
|
// input / output paths
|
||||||
#define SUPPORT_PATHS "0:/gm9/support", "0:", "0:/files9" // legacy paths
|
#define SUPPORT_PATHS "0:/gm9/support", "0:", "0:/files9" // legacy paths
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "ui.h"
|
|
||||||
|
|
||||||
void Reboot() {
|
void Reboot() {
|
||||||
ClearScreenF(true, true, COLOR_STD_BG);
|
I2C_writeReg(I2C_DEV_MCU, 0x22, 1 << 0); // poweroff LCD to prevent MCU hangs
|
||||||
flushEntireDCache();
|
flushEntireDCache();
|
||||||
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 2))
|
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 2))
|
||||||
while(true);
|
while(true);
|
||||||
@ -12,7 +11,7 @@ void Reboot() {
|
|||||||
|
|
||||||
void PowerOff()
|
void PowerOff()
|
||||||
{
|
{
|
||||||
ClearScreenF(true, true, COLOR_STD_BG);
|
I2C_writeReg(I2C_DEV_MCU, 0x22, 1 << 0); // poweroff LCD to prevent MCU hangs
|
||||||
flushEntireDCache();
|
flushEntireDCache();
|
||||||
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 0))
|
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 0))
|
||||||
while (true);
|
while (true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user