feat: T-Watch Ultra support

This commit is contained in:
mverch67
2025-09-30 20:05:22 +02:00
parent 94d4bdf05c
commit d5bb3db4ed
20 changed files with 489 additions and 20 deletions

View File

@@ -198,6 +198,8 @@
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_V4
#elif defined(M5STACK_UNITC6L)
#define HW_VENDOR meshtastic_HardwareModel_M5STACK_C6L
#elif defined(T_WATCH_ULTRA)
#define HW_VENDOR meshtastic_HardwareModel_T_WATCH_ULTRA
#endif
// -----------------------------------------------------------------------------

View File

@@ -0,0 +1,30 @@
#include "configuration.h"
#ifdef T_DECK_ULTRA
#include "TouchDrvCST92xx.h"
#include "input/TouchScreenImpl1.h"
#include <Wire.h>
static TouchDrvCST92xx touchDrv;
static bool readTouch(int16_t *x, int16_t *y)
{
return touchDrv.isPressed() && touchDrv.getPoint(x, y, 1);
}
// T-Watch Ultra specific init
void lateInitVariant()
{
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
pinmode(TP_INT, INPUT_PULLUP);
touchDrv.setPins(-1, TP_INT);
if (touchDrv.begin(&Wire, 0x1A, I2C_SDA, I2C_SCL)) {
touchScreenImpl1 = new TouchScreenImpl1(410, 502, readTouch);
touchScreenImpl1->init();
} else {
LOG_ERROR("failed to initialize CST92xx");
}
}
}
#endif