Refactored T3S3 board name variable
parent
cbe95b10d6
commit
2119d381b3
19
Boards.h
19
Boards.h
|
@ -41,12 +41,12 @@
|
|||
#define MODEL_A2 0xA2 // RNode v2.1, 433 MHz
|
||||
#define MODEL_A7 0xA7 // RNode v2.1, 868 MHz
|
||||
|
||||
#define BOARD_RNODE_NG_22 0x42 // RNode hardware revision v2.2 (T3S3)
|
||||
#define MODEL_A1 0xA1 // RNode v2.2, 433 MHz with SX1268
|
||||
#define MODEL_A5 0xA5 // RNode v2.2, 433 MHz with SX1278
|
||||
#define MODEL_A6 0xA6 // RNode v2.2, 868 MHz with SX1262
|
||||
#define MODEL_AA 0xAA // RNode v2.2, 868 MHz with SX1276
|
||||
#define MODEL_AC 0xAC // RNode v2.2, 2.4 GHz with SX1280 and PA
|
||||
#define BOARD_T3S3 0x42 // T3S3 devices
|
||||
#define MODEL_A1 0xA1 // T3S3, 433 MHz with SX1268
|
||||
#define MODEL_A5 0xA5 // T3S3, 433 MHz with SX1278
|
||||
#define MODEL_A6 0xA6 // T3S3, 868 MHz with SX1262
|
||||
#define MODEL_AA 0xAA // T3S3, 868 MHz with SX1276
|
||||
#define MODEL_AC 0xAC // T3S3, 2.4 GHz with SX1280 and PA
|
||||
|
||||
#define PRODUCT_TBEAM 0xE0 // T-Beam devices
|
||||
#define BOARD_TBEAM 0x33
|
||||
|
@ -92,8 +92,8 @@
|
|||
|
||||
#define PRODUCT_HELTEC_T114 0xC2 // Heltec Mesh Node T114
|
||||
#define BOARD_HELTEC_T114 0x3C
|
||||
#define MODEL_C6 0xC6 // Heltec Mesh Node T114, 470-510 MHz (HT-n5262-LF)
|
||||
#define MODEL_C7 0xC7 // Heltec Mesh Node T114, 863-928 MHz (HT-n5262-HF)
|
||||
#define MODEL_C6 0xC6 // Heltec Mesh Node T114, 470-510 MHz
|
||||
#define MODEL_C7 0xC7 // Heltec Mesh Node T114, 863-928 MHz
|
||||
|
||||
#define PRODUCT_RAK4631 0x10
|
||||
#define BOARD_RAK4631 0x51
|
||||
|
@ -413,7 +413,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#elif BOARD_MODEL == BOARD_T3S3
|
||||
#define IS_ESP32S3 true
|
||||
#define HAS_DISPLAY true
|
||||
#define HAS_CONSOLE true
|
||||
|
@ -644,6 +644,7 @@
|
|||
#define HAS_TCXO true
|
||||
#define HAS_BUSY true
|
||||
#define HAS_INPUT true
|
||||
#define HAS_SLEEP true
|
||||
#define DIO2_AS_RF_SWITCH true
|
||||
#define CONFIG_UART_BUFFER_SIZE 6144
|
||||
#define CONFIG_QUEUE_SIZE 6144
|
||||
|
|
8
Power.h
8
Power.h
|
@ -62,7 +62,7 @@
|
|||
bool bat_voltage_dropping = false;
|
||||
float bat_delay_v = 0;
|
||||
float bat_state_change_v = 0;
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#elif BOARD_MODEL == BOARD_T3S3
|
||||
#define BAT_V_MIN 3.15
|
||||
#define BAT_V_MAX 4.217
|
||||
#define BAT_V_CHG 4.48
|
||||
|
@ -138,13 +138,13 @@ uint8_t pmu_rc = 0;
|
|||
void kiss_indicate_battery();
|
||||
|
||||
void measure_battery() {
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_21 || BOARD_MODEL == BOARD_LORA32_V2_1 || BOARD_MODEL == BOARD_HELTEC32_V3 || BOARD_MODEL == BOARD_TDECK || BOARD_MODEL == BOARD_RNODE_NG_22 || BOARD_MODEL == BOARD_HELTEC_T114
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_21 || BOARD_MODEL == BOARD_LORA32_V2_1 || BOARD_MODEL == BOARD_HELTEC32_V3 || BOARD_MODEL == BOARD_TDECK || BOARD_MODEL == BOARD_T3S3 || BOARD_MODEL == BOARD_HELTEC_T114
|
||||
battery_installed = true;
|
||||
battery_indeterminate = true;
|
||||
|
||||
#if BOARD_MODEL == BOARD_HELTEC32_V3
|
||||
float battery_measurement = (float)(analogRead(pin_vbat)) * 0.0041;
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#elif BOARD_MODEL == BOARD_T3S3
|
||||
float battery_measurement = (float)(analogRead(pin_vbat)) / 4095.0*6.7828;
|
||||
#elif BOARD_MODEL == BOARD_HELTEC_T114
|
||||
float battery_measurement = (float)(analogRead(pin_vbat)) * 0.017165;
|
||||
|
@ -322,7 +322,7 @@ void update_pmu() {
|
|||
}
|
||||
|
||||
bool init_pmu() {
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_21 || BOARD_MODEL == BOARD_LORA32_V2_1 || BOARD_MODEL == BOARD_TDECK || BOARD_MODEL ==BOARD_RNODE_NG_22
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_21 || BOARD_MODEL == BOARD_LORA32_V2_1 || BOARD_MODEL == BOARD_TDECK || BOARD_MODEL ==BOARD_T3S3
|
||||
pinMode(pin_vbat, INPUT);
|
||||
return true;
|
||||
#elif BOARD_MODEL == BOARD_HELTEC32_V3
|
||||
|
|
12
Utilities.h
12
Utilities.h
|
@ -74,7 +74,7 @@ uint8_t eeprom_read(uint32_t mapped_addr);
|
|||
#if BOARD_MODEL == BOARD_HELTEC32_V3
|
||||
//https://github.com/espressif/esp-idf/issues/8855
|
||||
#include "hal/wdt_hal.h"
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#elif BOARD_MODEL == BOARD_T3S3
|
||||
#include "hal/wdt_hal.h"
|
||||
#else
|
||||
#include "hal/wdt_hal.h"
|
||||
|
@ -119,6 +119,12 @@ uint8_t boot_vector = 0x00;
|
|||
}
|
||||
|
||||
void led_init() {
|
||||
#if BOARD_MODEL == BOARD_HELTEC_T114
|
||||
// Enable vext power supply to neopixel
|
||||
pinMode(PIN_T114_VEXT_EN, OUTPUT);
|
||||
digitalWrite(PIN_T114_VEXT_EN, HIGH);
|
||||
#endif
|
||||
|
||||
#if MCU_VARIANT == MCU_NRF52
|
||||
if (eeprom_read(eeprom_addr(ADDR_CONF_PSET)) == CONF_OK_BYTE) {
|
||||
uint8_t int_val = eeprom_read(eeprom_addr(ADDR_CONF_PINT));
|
||||
|
@ -189,7 +195,7 @@ uint8_t boot_vector = 0x00;
|
|||
void led_tx_off() { digitalWrite(pin_led_tx, LOW); }
|
||||
void led_id_on() { }
|
||||
void led_id_off() { }
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#elif BOARD_MODEL == BOARD_T3S3
|
||||
void led_rx_on() { digitalWrite(pin_led_rx, HIGH); }
|
||||
void led_rx_off() { digitalWrite(pin_led_rx, LOW); }
|
||||
void led_tx_on() { digitalWrite(pin_led_tx, HIGH); }
|
||||
|
@ -1469,7 +1475,7 @@ bool eeprom_model_valid() {
|
|||
if (model == MODEL_A3 || model == MODEL_A8) {
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_21
|
||||
if (model == MODEL_A2 || model == MODEL_A7) {
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#elif BOARD_MODEL == BOARD_T3S3
|
||||
if (model == MODEL_A1 || model == MODEL_A6 || model == MODEL_A5 || model == MODEL_AA || model == MODEL_AC) {
|
||||
#elif BOARD_MODEL == BOARD_HMBRW
|
||||
if (model == MODEL_FF || model == MODEL_FE) {
|
||||
|
|
|
@ -121,7 +121,7 @@ bool sx126x::preInit() {
|
|||
pinMode(_ss, OUTPUT);
|
||||
digitalWrite(_ss, HIGH);
|
||||
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_22 || BOARD_MODEL == BOARD_HELTEC32_V3 || BOARD_MODEL == BOARD_TDECK
|
||||
#if BOARD_MODEL == BOARD_T3S3 || BOARD_MODEL == BOARD_HELTEC32_V3 || BOARD_MODEL == BOARD_TDECK
|
||||
SPI.begin(pin_sclk, pin_miso, pin_mosi, pin_cs);
|
||||
#else
|
||||
SPI.begin();
|
||||
|
@ -565,7 +565,7 @@ void sx126x::enableTCXO() {
|
|||
uint8_t buf[4] = {MODE_TCXO_1_8V_6X, 0x00, 0x00, 0xFF};
|
||||
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
|
||||
uint8_t buf[4] = {MODE_TCXO_1_8V_6X, 0x00, 0x00, 0xFF};
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#elif BOARD_MODEL == BOARD_T3S3
|
||||
uint8_t buf[4] = {MODE_TCXO_1_8V_6X, 0x00, 0x00, 0xFF};
|
||||
#elif BOARD_MODEL == BOARD_HELTEC_T114
|
||||
uint8_t buf[4] = {MODE_TCXO_1_8V_6X, 0x00, 0x00, 0xFF};
|
||||
|
|
|
@ -100,7 +100,7 @@ bool sx127x::preInit() {
|
|||
pinMode(_ss, OUTPUT);
|
||||
digitalWrite(_ss, HIGH);
|
||||
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_22
|
||||
#if BOARD_MODEL == BOARD_T3S3
|
||||
SPI.begin(pin_sclk, pin_miso, pin_mosi, pin_cs);
|
||||
#else
|
||||
SPI.begin();
|
||||
|
|
|
@ -134,7 +134,7 @@ bool sx128x::preInit() {
|
|||
|
||||
// TODO: Check if this change causes issues on any platforms
|
||||
#if MCU_VARIANT == MCU_ESP32
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_22 || BOARD_MODEL == BOARD_HELTEC32_V3 || BOARD_MODEL == BOARD_TDECK
|
||||
#if BOARD_MODEL == BOARD_T3S3 || BOARD_MODEL == BOARD_HELTEC32_V3 || BOARD_MODEL == BOARD_TDECK
|
||||
SPI.begin(pin_sclk, pin_miso, pin_mosi, pin_cs);
|
||||
#else
|
||||
SPI.begin();
|
||||
|
|
Loading…
Reference in New Issue