feat(boards): add ESP32-32E-4 (4" ST7796) board support

This commit is contained in:
2026-02-17 22:07:51 -08:00
parent a42415e64e
commit cbe7efe883
8 changed files with 405 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
#pragma once
#include "board_config.h"
#include <KlubhausCore.h>
#include <TFT_eSPI.h>
class DisplayDriverTFT : public IDisplayDriver {
public:
void begin() override;
void setBacklight(bool on) override;
void render(const ScreenState& state) override;
TouchEvent readTouch() override;
int dashboardTouch(int x, int y) override;
HoldState updateHold(unsigned long holdMs) override;
void updateHint(int x, int y, bool active) override;
int width() override { return DISPLAY_WIDTH; }
int height() override { return DISPLAY_HEIGHT; }
private:
void drawBoot();
void drawAlert(const ScreenState& st);
void drawDashboard(const ScreenState& st);
TFT_eSPI _tft;
bool _holdActive = false;
uint32_t _holdStartMs = 0;
ScreenID _lastScreen = ScreenID::BOOT;
bool _needsRedraw = true;
};