M5Stack Tab5's backlight doesn't need PWM inversion - the official demo uses direct duty cycle without any inversion flag. (#1764)

uint32_t duty_cycle = (4095 * brightness_percent) / 100;
ledc_set_duty(LEDC_LOW_SPEED_MODE, LCD_LEDC_CH, duty_cycle);

https://github.com/m5stack/M5Tab5-UserDemo/blob/main/platforms/tab5/components/m5stack_tab5/m5stack_tab5.c#L1088

Tested on M5Stack Tab5, the screen brightness is working correctly now, previously it's reversed.
This commit is contained in:
Ted Feng
2026-02-13 18:10:19 +13:00
committed by GitHub
parent d545f746bc
commit 87cff80098

View File

@@ -45,7 +45,7 @@
#define DISPLAY_OFFSET_Y 0
#define DISPLAY_BACKLIGHT_PIN GPIO_NUM_22
#define DISPLAY_BACKLIGHT_OUTPUT_INVERT true
#define DISPLAY_BACKLIGHT_OUTPUT_INVERT false
#define TOUCH_INT_GPIO GPIO_NUM_23 // 触摸中断