Power off drops the peripheral rail (PWR_ON low), sleeps the panel and puts the chip into deep sleep with ext1 wake armed on the encoder pins, choosing any-low or any-high from the knob's resting state so a single detent wakes it. The button (GPIO0) is not a wake source on purpose.
13 lines
307 B
C
13 lines
307 B
C
#pragma once
|
|
#include <stdint.h>
|
|
|
|
#define LCD_H_RES 320
|
|
#define LCD_V_RES 170
|
|
|
|
// Brings up the ST7789 over SPI, starts the LVGL task. Backlight stays off.
|
|
void display_init(void);
|
|
// 0..100
|
|
void display_set_backlight(uint8_t percent);
|
|
// Panel sleep-in (used before powering down).
|
|
void display_off(void);
|