initial support for thinknode m9

This commit is contained in:
liamcottle
2026-07-13 19:07:09 +12:00
parent 1c5a8426e8
commit 87bf371cd3
12 changed files with 563 additions and 1 deletions
+1
View File
@@ -42,6 +42,7 @@ void AutoDiscoverRTCClock::begin(TwoWire& wire) {
}
if (i2c_probe(wire, PCF8563_ADDRESS)) {
MESH_DEBUG_PRINTLN("PCF8563: Found");
rtc_8563_success = rtc_8563.begin(&wire);
}
+14
View File
@@ -18,6 +18,14 @@
#define SCALE_Y 2.109375f // 135 / 64
#endif
#ifdef DISPLAY_SCALE_X
#define SCALE_X DISPLAY_SCALE_X
#endif
#ifdef DISPLAY_SCALE_Y
#define SCALE_Y DISPLAY_SCALE_Y
#endif
bool ST7789Display::begin() {
if(!_isOn) {
pinMode(PIN_TFT_VDD_CTL, OUTPUT);
@@ -32,6 +40,9 @@ bool ST7789Display::begin() {
display.init();
display.landscapeScreen();
#ifdef DISPLAY_FLIP_VERTICALLY
display.flipScreenVertically();
#endif
display.displayOn();
setCursor(0,0);
@@ -49,6 +60,9 @@ void ST7789Display::turnOn() {
// Re-initialize the display
display.init();
display.displayOn();
#ifdef DISPLAY_FLIP_VERTICALLY
display.flipScreenVertically();
#endif
delay(20);
// Now turn on the backlight
+3 -1
View File
@@ -14,8 +14,10 @@ class ST7789Display : public DisplayDriver {
bool i2c_probe(TwoWire& wire, uint8_t addr);
public:
#ifdef HELTEC_VISION_MASTER_T190
#if defined(HELTEC_VISION_MASTER_T190)
ST7789Display() : DisplayDriver(128, 64), display(&SPI, PIN_TFT_RST, PIN_TFT_DC, PIN_TFT_CS, GEOMETRY_RAWMODE, 320, 170,PIN_TFT_SDA,-1,PIN_TFT_SCL) {_isOn = false;}
#elif defined(THINKNODE_M9)
ST7789Display() : DisplayDriver(128, 64), display(&SPI, ST7789_RESET, ST7789_RS, ST7789_CS, GEOMETRY_RAWMODE, 320, 240, ST7789_SDA, ST7789_MISO, ST7789_SCK) {_isOn = false;}
#else
ST7789Display() : DisplayDriver(128, 64), display(&SPI1, PIN_TFT_RST, PIN_TFT_DC, PIN_TFT_CS, GEOMETRY_RAWMODE, 240, 135) {_isOn = false;}
#endif