Board bring-up for the 7-inch ESP32-P4 display board: touch I2C bus, backlight PWM and the GT911 reset.
More...
|
| static esp_err_t | backlight_init (void) |
| | Set up the backlight's LEDC timer and channel, dark.
|
| esp_err_t | board_init (void) |
| | Bring up the touch I2C bus and the backlight PWM, the backlight at 0% (dark).
|
| i2c_master_bus_handle_t | board_i2c_bus (void) |
| | The touch bus: the GT911 and, in a build with it, the touch injector.
|
| esp_err_t | board_backlight_percent (int percent) |
| | Set the backlight brightness.
|
| esp_err_t | board_backlight (bool on) |
| | Backlight at 100% or 0%.
|
| esp_err_t | board_touch_reset_sequence (void) |
| | Run the GT911 reset on BOARD_TOUCH_PIN_RST: low 20ms, high, then 60ms before the first read. Does nothing with GPIO_NUM_NC. INT is not wired to the SoC, so the address the GT911 takes is its own choice; gt911_new() probes 0x5D, then 0x14.
|
Board bring-up for the 7-inch ESP32-P4 display board: touch I2C bus, backlight PWM and the GT911 reset.
SPDX-License-Identifier: MIT
| esp_err_t backlight_init |
( |
void | | ) |
|
|
static |
Set up the backlight's LEDC timer and channel, dark.
LEDC low-speed mode, inverted output: duty 0 holds GPIO32 high, the dimmest state, from the moment the channel exists. Before that the pin is undriven and the converter's own resistors set the brightest state (from the schematic, not measured).
- Returns
- ESP_OK, or the LEDC error.