bdk: display: wait 2us for bl pwm config to take

Fixes the tiny blink showing up while pwm is still at max.
This commit is contained in:
CTCaer 2024-05-19 10:15:52 +03:00
parent 1214ab0e02
commit 4bc0a0591c

View file

@ -630,6 +630,8 @@ void display_backlight_pwm_init()
PWM(PWM_CONTROLLER_PWM_CSR_0) = PWM_CSR_EN; PWM(PWM_CONTROLLER_PWM_CSR_0) = PWM_CSR_EN;
PINMUX_AUX(PINMUX_AUX_LCD_BL_PWM) = (PINMUX_AUX(PINMUX_AUX_LCD_BL_PWM) & ~PINMUX_FUNC_MASK) | 1; // Set PWM0 mode. PINMUX_AUX(PINMUX_AUX_LCD_BL_PWM) = (PINMUX_AUX(PINMUX_AUX_LCD_BL_PWM) & ~PINMUX_FUNC_MASK) | 1; // Set PWM0 mode.
usleep(2);
gpio_config(GPIO_PORT_V, GPIO_PIN_0, GPIO_MODE_SPIO); // Backlight power mode. gpio_config(GPIO_PORT_V, GPIO_PIN_0, GPIO_MODE_SPIO); // Backlight power mode.
} }