Skip to main content

Module backlight

Module backlight 

Source
Expand description

LCD backlight on GPIO38, dimmed with LEDC PWM.

GPIO38 also switches power to the RGB LED. A WS2812 loses its state whenever its supply drops, so any dimming below full brightness chops the LED’s power at the PWM rate. Keep the backlight at Backlight::MAX while using the RGB LED. (Inferred from the schematic and M5Stack’s docs; not yet measured on hardware.)

The driver uses LEDC low-speed timer 0 and channel 0. Dropping a Backlight leaves the PWM running at its last level.

Structs§

Backlight
Backlight brightness control.
BacklightResources
LEDC peripheral and the backlight pin.

Constants§

PWM_FREQUENCY
PWM frequency: well above visible flicker and within 8-bit LEDC range from the 80 MHz APB clock.