feat: implement EInkDisplayHandler for enhanced E-Ink display management and touch input handling

This commit is contained in:
GW_MC
2026-01-24 10:39:03 +08:00
parent 4f7418c77a
commit d248557614
2 changed files with 424 additions and 3 deletions

View File

@@ -107,13 +107,19 @@ void DisplayHandler::_epd_init(void) {
// Check BUSY pin
ESP_LOGI("DisplayHandler", "Waiting for EPD to be ready...");
while (gpio_get_level(PIN_BUSY) == 1) {
while (gpio_get_level(PIN_BUSY) == 0) { // 0=BUSY, 1=FREE
vTaskDelay(pdMS_TO_TICKS(10));
}
ESP_LOGI("DisplayHandler", "EPD is ready.");
const uint8_t booster_data[] = { 0x27, 0x27 };
epd_write_cmd_with_data(0x06, booster_data, 2); // Booster Soft Start
const uint8_t booster_data[] = { 0x27, 0x27, 0x18, 0x17 };
epd_write_cmd_with_data(0x06, booster_data, 4); // Booster Soft Start
vTaskDelay(pdMS_TO_TICKS(10));
// Enhanced display drive commands
const uint8_t e0_data[] = { 0x02 };
epd_write_cmd_with_data(0xE0, e0_data, 1);
const uint8_t e5_data[] = { 0x5A };
epd_write_cmd_with_data(0xE5, e5_data, 1);
}
void DisplayHandler::_touch_init(void) {