Files
wadamesh/variants/lilygo_tdeck/TDeckBoard.cpp
T
Kaj SchittecatandClaude Opus 4.8 02e267deba feat: add LilyGo T-Deck / T-Deck Plus board
Second board. Flattened env LilyGo_TDeck_companion_radio_touch (GT911 touch +
matrix keyboard + trackball, ST7789 via Adafruit, sensors off except GPS),
building green against MeshCore@v1.16.0-wada.0. Output byte-identical to the
in-tree meshcomod T-Deck build (delta = build-path strings).

Both touch boards now build from the published fork via lib_deps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Kaj Schittecat <kaj@schittecat.com>
2026-06-13 00:07:08 +02:00

35 lines
914 B
C++

#include <Arduino.h>
#include "TDeckBoard.h"
uint32_t deviceOnline = 0x00;
void TDeckBoard::begin() {
ESP32Board::begin();
// Enable peripheral power
pinMode(PIN_PERF_POWERON, OUTPUT);
digitalWrite(PIN_PERF_POWERON, HIGH);
// Configure user button
pinMode(PIN_USER_BTN, INPUT);
// Configure LoRa Pins
pinMode(P_LORA_MISO, INPUT_PULLUP);
// pinMode(P_LORA_DIO_1, INPUT_PULLUP);
#ifdef P_LORA_TX_LED
digitalWrite(P_LORA_TX_LED, HIGH); // inverted pin for SX1276 - HIGH for off
#endif
esp_reset_reason_t reason = esp_reset_reason();
if (reason == ESP_RST_DEEPSLEEP) {
long wakeup_source = esp_sleep_get_ext1_wakeup_status();
if (wakeup_source & (1 << P_LORA_DIO_1)) {
startup_reason = BD_STARTUP_RX_PACKET; // received a LoRa packet (while in deep sleep)
}
rtc_gpio_hold_dis((gpio_num_t)P_LORA_NSS);
rtc_gpio_deinit((gpio_num_t)P_LORA_DIO_1);
}
}