Skip to content

Commit c60237a

Browse files
committed
Poweroff LCD before reboot / poweroff
... fixes several MCU issues
1 parent 730b886 commit c60237a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

source/common/common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#endif
5050

5151
// GodMode9 version
52-
#define VERSION "1.2.6"
52+
#define VERSION "1.2.7"
5353

5454
// input / output paths
5555
#define SUPPORT_PATHS "0:/gm9/support", "0:", "0:/files9" // legacy paths

source/common/power.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
#include "power.h"
22
#include "i2c.h"
33
#include "cache.h"
4-
#include "ui.h"
54

65
void Reboot() {
7-
ClearScreenF(true, true, COLOR_STD_BG);
6+
I2C_writeReg(I2C_DEV_MCU, 0x22, 1 << 0); // poweroff LCD to prevent MCU hangs
87
flushEntireDCache();
98
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 2))
109
while(true);
1110
}
1211

1312
void PowerOff()
1413
{
15-
ClearScreenF(true, true, COLOR_STD_BG);
14+
I2C_writeReg(I2C_DEV_MCU, 0x22, 1 << 0); // poweroff LCD to prevent MCU hangs
1615
flushEntireDCache();
1716
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 0))
1817
while (true);

0 commit comments

Comments
 (0)