]> git.tnoah.ca Git - lora-radio.git/commitdiff
Fix T-Echo build
authorjacob.eva <x00010@disroot.org>
Mon, 3 Feb 2025 17:43:08 +0000 (17:43 +0000)
committerjacob.eva <x00010@disroot.org>
Mon, 3 Feb 2025 17:43:08 +0000 (17:43 +0000)
Boards.h
RNode_Firmware_CE.ino

index 45ee13005dabde885b7a6584b64d769d565127bc..b0bfafeeb4a6c6bfd2ef26ea51853617a6ab6a52 100644 (file)
--- a/Boards.h
+++ b/Boards.h
   
   #elif MCU_VARIANT == MCU_NRF52
      #if BOARD_MODEL == BOARD_TECHO
-      #define VALIDATE_FIRMWARE false
+      #define _PINNUM(port, pin) ((port) * 32 + (pin))
       #define HAS_INPUT true
-      //#define GPS_BAUD_RATE 115200
-      //#define PIN_GPS_TX 41
-      //#define PIN_GPS_RX 40
       #define EEPROM_SIZE 296
       #define EEPROM_OFFSET EEPROM_SIZE-EEPROM_RESERVED
-      //#define HAS_EEPROM true
-      //#define HAS_SD true
+      #define HAS_EEPROM false
+      #define HAS_SD false
       #define HAS_DISPLAY true
       #define DISPLAY EINK_BW
       #define DISPLAY_MODEL GxEPD2_154_D67
-      //#define HAS_CONSOLE true
-      //#define HAS_TXCO true
-      //#define HAS_BLE true
-      //#define HAS_PMU true
-      #define CONFIG_UART_BUFFER_SIZE 40000
+      #define BLE_MANUFACTURER "LilyGO"
+      #define BLE_MODEL "T-Echo"
+      #define HAS_CONSOLE false
+      #define HAS_BLE true
+      #define HAS_PMU true
+      #define CONFIG_UART_BUFFER_SIZE 32768
       #define CONFIG_QUEUE_0_SIZE 6144
       #define CONFIG_QUEUE_MAX_LENGTH 200
-      //#define BLE_MANUFACTURER "LilyGO"
-      //#define BLE_MODEL "T-Echo"
       #define INTERFACE_COUNT 1
       //#define I2C_SDA 26
       //#define I2C_SCL 27
       #define CONFIG_QUEUE_1_SIZE 40000
+      #define HAS_BACKLIGHT true
       // first interface in list is the primary
       const uint8_t interfaces[INTERFACE_COUNT] = {SX1262};
       const bool interface_cfg[INTERFACE_COUNT][3] = { 
       const int pin_disp_mosi = 29;
       const int pin_disp_miso = -1;
 
-      #define HAS_BACKLIGHT true
-      const int pin_btn_usr1 = 42;
+      //#define GPS_BAUD_RATE 115200
+      //#define PIN_GPS_TX 41
+      //#define PIN_GPS_RX 40
+
+      const int pin_btn_usr1 = _PINNUM(1, 10);
+      const int pin_btn_touch = _PINNUM(0, 11);
+
       const int pin_backlight = 43;
 
-      const int pin_led_rx = LED_BLUE;
-      const int pin_led_tx = LED_RED;
+      #define LED_ON LOW
+      #define LED_OFF HIGH
+      #define PIN_LED_GREEN _PINNUM(1, 1)
+      #define PIN_LED_RED   _PINNUM(1, 3)
+      #define PIN_LED_BLUE  _PINNUM(0, 14)
+      #define PIN_VEXT_EN _PINNUM(0, 12)
+      const int pin_led_rx = PIN_LED_BLUE;
+      const int pin_led_tx = PIN_LED_RED;
+
     #elif BOARD_MODEL == BOARD_RAK4631 || BOARD_MODEL == BOARD_OPENCOM_XL
       #define HAS_EEPROM false
       #define HAS_DISPLAY false 
index 4ef3727fe42ea22998d2a18b7386985e9f00f2ff..c8461ac20d6c85c4ebd99f17ff5f57267dd23896 100644 (file)
@@ -600,6 +600,7 @@ bool startRadio(RadioInterface* radio) {
         return true;
       }
   }
+  return false;
 }
 
 void stopRadio(RadioInterface* radio) {