Add SetOff menu (experimental)

This commit is contained in:
Armel FAUVEAU
2024-09-24 22:55:33 +02:00
parent 7fdc2cc3f9
commit 4a144cb522
13 changed files with 115 additions and 2 deletions

View File

@@ -256,6 +256,17 @@ void ST7565_Init(void)
ST7565_FillScreen(0x00);
}
#ifdef ENABLE_FEAT_F4HWN_SLEEP
void ST7565_ShutDown(void)
{
SPI_ToggleMasterMode(&SPI0->CR, false);
ST7565_WriteByte(ST7565_CMD_POWER_CIRCUIT | 0b000); // VB=0 VR=1 VF=1
ST7565_WriteByte(ST7565_CMD_SET_START_LINE | 0); // line 0
ST7565_WriteByte(ST7565_CMD_DISPLAY_ON_OFF | 0); // D=1
SPI_ToggleMasterMode(&SPI0->CR, true);
}
#endif
void ST7565_FixInterfGlitch(void)
{
SPI_ToggleMasterMode(&SPI0->CR, false);