Added T-Beam Supreme support

This commit is contained in:
Mark Qvist 2024-10-05 00:42:19 +02:00
parent bd887f7de2
commit 6974a50d10
9 changed files with 292 additions and 114 deletions

131
Boards.h
View File

@ -27,22 +27,78 @@
#define MCU_ESP32 0x81
#define MCU_NRF52 0x71
#define BOARD_RNODE 0x31
#define BOARD_HMBRW 0x32
// Products, boards and models ////
#define PRODUCT_RNODE 0x03 // RNode devices
#define BOARD_RNODE 0x31 // Original v1.0 RNode
#define MODEL_A4 0xA4 // RNode v1.0, 433 MHz
#define MODEL_A9 0xA9 // RNode v1.0, 868 MHz
#define BOARD_RNODE_NG_20 0x40 // RNode hardware revision v2.0
#define MODEL_A3 0xA3 // RNode v2.0, 433 MHz
#define MODEL_A8 0xA8 // RNode v2.0, 868 MHz
#define BOARD_RNODE_NG_21 0x41 // RNode hardware revision v2.1
#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
#define MODEL_A1 0xA1 // RNode v2.2, 433 MHz
#define MODEL_A6 0xA6 // RNode v2.2, 868 MHz
#define PRODUCT_TBEAM 0xE0 // T-Beam devices
#define BOARD_TBEAM 0x33
#define MODEL_E4 0xE4 // T-Beam SX1278, 433 Mhz
#define MODEL_E9 0xE9 // T-Beam SX1276, 868 Mhz
#define MODEL_E3 0xE3 // T-Beam SX1268, 433 Mhz
#define MODEL_E8 0xE8 // T-Beam SX1262, 868 Mhz
#define PRODUCT_TDECK_V1 0xD0
#define BOARD_TDECK 0x3B
#define MODEL_D4 0xD4 // LilyGO T-Deck, 433 MHz
#define MODEL_D9 0xD9 // LilyGO T-Deck, 868 MHz
#define PRODUCT_TBEAM_S_V1 0xEA
#define BOARD_TBEAM_S_V1 0x3D
#define MODEL_DB 0xDB // LilyGO T-Beam Supreme, 433 MHz
#define MODEL_DC 0xDC // LilyGO T-Beam Supreme, 868 MHz
#define PRODUCT_T32_10 0xB2
#define BOARD_LORA32_V1_0 0x39
#define MODEL_BA 0xBA // LilyGO T3 v1.0, 433 MHz
#define MODEL_BB 0xBB // LilyGO T3 v1.0, 868 MHz
#define PRODUCT_T32_20 0xB0
#define BOARD_LORA32_V2_0 0x36
#define MODEL_B3 0xB3 // LilyGO T3 v2.0, 433 MHz
#define MODEL_B8 0xB8 // LilyGO T3 v2.0, 868 MHz
#define PRODUCT_T32_21 0xB1
#define BOARD_LORA32_V2_1 0x37
#define MODEL_B4 0xB4 // LilyGO T3 v2.1, 433 MHz
#define MODEL_B9 0xB9 // LilyGO T3 v2.1, 868 MHz
#define PRODUCT_H32_V2 0xC0 // Board code 0x38
#define BOARD_HELTEC32_V2 0x38
#define MODEL_C4 0xC4 // Heltec Lora32 v2, 433 MHz
#define MODEL_C9 0xC9 // Heltec Lora32 v2, 868 MHz
#define PRODUCT_H32_V3 0xC1
#define BOARD_HELTEC32_V3 0x3A
#define MODEL_C5 0xC5 // Heltec Lora32 v3, 433 MHz
#define MODEL_CA 0xCA // Heltec Lora32 v3, 868 MHz
#define PRODUCT_RAK4631 0x10
#define BOARD_RAK4631 0x51
#define MODEL_11 0x11 // RAK4631, 433 Mhz
#define MODEL_12 0x12 // RAK4631, 868 Mhz
#define PRODUCT_HMBRW 0xF0
#define BOARD_HMBRW 0x32
#define BOARD_HUZZAH32 0x34
#define BOARD_GENERIC_ESP32 0x35
#define BOARD_LORA32_V2_0 0x36
#define BOARD_LORA32_V2_1 0x37
#define BOARD_LORA32_V1_0 0x39
#define BOARD_HELTEC32_V2 0x38
#define BOARD_HELTEC32_V3 0x3A
#define BOARD_TDECK 0x3B
#define BOARD_RNODE_NG_20 0x40
#define BOARD_RNODE_NG_21 0x41
#define BOARD_RNODE_NG_22 0x42
#define BOARD_GENERIC_NRF52 0x50
#define BOARD_RAK4631 0x51
#define MODEL_FE 0xFE // Homebrew board, max 17dBm output power
#define MODEL_FF 0xFF // Homebrew board, max 14dBm output power
#if defined(__AVR_ATmega1284P__)
#define PLATFORM PLATFORM_AVR
@ -443,6 +499,57 @@
#endif
#endif
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
#define IS_ESP32S3 true
#define MODEM SX1262
#define DIO2_AS_RF_SWITCH true
#define HAS_BUSY true
#define HAS_TCXO true
#define HAS_DISPLAY true
#define HAS_CONSOLE true
#define HAS_BLUETOOTH false
#define HAS_BLE true
#define HAS_PMU true
#define HAS_NP false
#define HAS_SD false
#define HAS_EEPROM true
#define HAS_INPUT true
#define HAS_SLEEP false
#define PMU_IRQ 40
#define I2C_SCL 41
#define I2C_SDA 42
const int pin_btn_usr1 = 0;
const int pin_cs = 10;
const int pin_reset = 5;
const int pin_sclk = 12;
const int pin_mosi = 11;
const int pin_miso = 13;
const int pin_tcxo_enable = -1;
const int pin_dio = 1;
const int pin_busy = 4;
const int SD_MISO = 37;
const int SD_MOSI = 35;
const int SD_CLK = 36;
const int SD_CS = 47;
const int IMU_CS = 34;
#if HAS_NP == false
#if defined(EXTERNAL_LEDS)
const int pin_led_rx = 43;
const int pin_led_tx = 43;
#else
const int pin_led_rx = 43;
const int pin_led_tx = 43;
#endif
#endif
#else
#error An unsupported ESP32 board was selected. Cannot compile RNode firmware.
#endif

View File

@ -18,6 +18,8 @@
#if BOARD_MODEL == BOARD_TDECK
#include <Adafruit_ST7789.h>
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
#include <Adafruit_SH110X.h>
#else
#include <Wire.h>
#include <Adafruit_SSD1306.h>
@ -51,6 +53,12 @@
#define DISP_ADDR 0x3C
#define SCL_OLED 17
#define SDA_OLED 18
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
#define DISP_RST -1
#define DISP_ADDR 0x3C
#define SCL_OLED 18
#define SDA_OLED 17
#define DISP_CUSTOM_ADDR false
#else
#define DISP_RST -1
#define DISP_ADDR 0x3C
@ -63,6 +71,10 @@
Adafruit_ST7789 display = Adafruit_ST7789(DISPLAY_CS, DISPLAY_DC, -1);
#define SSD1306_WHITE ST77XX_WHITE
#define SSD1306_BLACK ST77XX_BLACK
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
Adafruit_SH1106G display = Adafruit_SH1106G(128, 64, &Wire, -1);
#define SSD1306_WHITE SH110X_WHITE
#define SSD1306_BLACK SH110X_BLACK
#else
Adafruit_SSD1306 display(DISP_W, DISP_H, &Wire, DISP_RST);
#endif
@ -114,12 +126,10 @@ void update_area_positions() {
}
uint8_t display_contrast = 0x00;
#if BOARD_MODEL != BOARD_TDECK
void set_contrast(Adafruit_SSD1306 *display, uint8_t contrast) {
display->ssd1306_command(SSD1306_SETCONTRAST);
display->ssd1306_command(contrast);
#if BOARD_MODEL == BOARD_TBEAM_S_V1
void set_contrast(Adafruit_SH1106G *display, uint8_t value) {
}
#else
#elif BOARD_MODEL == BOARD_TDECK
void set_contrast(Adafruit_ST7789 *display, uint8_t value) {
static uint8_t level = 0;
static uint8_t steps = 16;
@ -144,6 +154,11 @@ uint8_t display_contrast = 0x00;
}
level = value;
}
#else
void set_contrast(Adafruit_SSD1306 *display, uint8_t contrast) {
display->ssd1306_command(SSD1306_SETCONTRAST);
display->ssd1306_command(contrast);
}
#endif
bool display_init() {
@ -175,6 +190,8 @@ bool display_init() {
delay(50);
digitalWrite(pin_display_en, HIGH);
Wire.begin(SDA_OLED, SCL_OLED);
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
Wire.begin(SDA_OLED, SCL_OLED);
#endif
#if DISP_CUSTOM_ADDR == true
@ -204,6 +221,8 @@ bool display_init() {
display.init(240, 320);
display.setSPISpeed(80e6);
if (false) {
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
if (!display.begin(display_address, true)) {
#else
if (!display.begin(SSD1306_SWITCHCAPVCC, display_address)) {
#endif
@ -228,6 +247,9 @@ bool display_init() {
#elif BOARD_MODEL == BOARD_TBEAM
disp_mode = DISP_MODE_LANDSCAPE;
display.setRotation(0);
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
disp_mode = DISP_MODE_PORTRAIT;
display.setRotation(1);
#elif BOARD_MODEL == BOARD_HELTEC32_V2
disp_mode = DISP_MODE_PORTRAIT;
display.setRotation(1);

View File

@ -33,6 +33,7 @@ prep-esp32:
arduino-cli core update-index --config-file arduino-cli.yaml
arduino-cli core install esp32:esp32@$(ARDUINO_ESP_CORE_VER) --config-file arduino-cli.yaml
arduino-cli lib install "Adafruit SSD1306"
arduino-cli lib install "Adafruit SH110X"
arduino-cli lib install "Adafruit ST7735 and ST7789 Library"
arduino-cli lib install "Adafruit NeoPixel"
arduino-cli lib install "XPowersLib"
@ -80,6 +81,9 @@ firmware-t3s3:
firmware-tdeck:
arduino-cli compile --log --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x3B\""
firmware-tbeam_supreme:
arduino-cli compile --log --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=-DBOARD_MODEL=0x3D"
firmware-lora32_v10: check_bt_buffers
arduino-cli compile --log --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x39\""
@ -174,8 +178,15 @@ upload-tdeck:
arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32s3
@sleep 1
rnodeconf /dev/ttyACM0 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.esp32s3/RNode_Firmware.ino.bin)
#@sleep 3
#python ./Release/esptool/esptool.py --chip esp32-s3 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
@sleep 3
python ./Release/esptool/esptool.py --chip esp32-s3 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
upload-tbeam_supreme:
arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32s3
@sleep 1
rnodeconf /dev/ttyACM0 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.esp32s3/RNode_Firmware.ino.bin)
@sleep 3
python ./Release/esptool/esptool.py --chip esp32-s3 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
upload-rnode_ng_20:
arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:ttgo-lora32

96
Power.h
View File

@ -1,9 +1,13 @@
#if BOARD_MODEL == BOARD_TBEAM
#if BOARD_MODEL == BOARD_TBEAM || BOARD_MODEL == BOARD_TBEAM_S_V1
#include <XPowersLib.h>
XPowersLibInterface* PMU = NULL;
#ifndef PMU_WIRE_PORT
#define PMU_WIRE_PORT Wire
#if BOARD_MODEL == BOARD_TBEAM_S_V1
#define PMU_WIRE_PORT Wire1
#else
#define PMU_WIRE_PORT Wire
#endif
#endif
#define BAT_V_MIN 3.15
@ -168,7 +172,7 @@ void measure_battery() {
// }
}
#elif BOARD_MODEL == BOARD_TBEAM
#elif BOARD_MODEL == BOARD_TBEAM || BOARD_MODEL == BOARD_TBEAM_S_V1
if (PMU) {
float discharge_current = 0;
float charge_current = 0;
@ -278,22 +282,16 @@ bool init_pmu() {
if (!PMU) {
PMU = new XPowersAXP2101(PMU_WIRE_PORT);
if (!PMU->init()) {
Serial.println("Warning: Failed to find AXP2101 power management");
delete PMU;
PMU = NULL;
} else {
Serial.println("AXP2101 PMU init succeeded, using AXP2101 PMU");
}
}
if (!PMU) {
PMU = new XPowersAXP192(PMU_WIRE_PORT);
if (!PMU->init()) {
Serial.println("Warning: Failed to find AXP192 power management");
delete PMU;
PMU = NULL;
} else {
Serial.println("AXP192 PMU init succeeded, using AXP192 PMU");
}
}
@ -398,6 +396,86 @@ bool init_pmu() {
// Set the time of pressing the button to turn off
PMU->setPowerKeyPressOffTime(XPOWERS_POWEROFF_4S);
return true;
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
Wire1.begin(I2C_SDA, I2C_SCL);
if (!PMU) {
PMU = new XPowersAXP2101(PMU_WIRE_PORT);
if (!PMU->init()) {
delete PMU;
PMU = NULL;
}
}
if (!PMU) {
return false;
}
/**
* gnss module power channel
* The default ALDO4 is off, you need to turn on the GNSS power first, otherwise it will be invalid during
* initialization
*/
PMU->setPowerChannelVoltage(XPOWERS_ALDO4, 3300);
PMU->enablePowerOutput(XPOWERS_ALDO4);
// lora radio power channel
PMU->setPowerChannelVoltage(XPOWERS_ALDO3, 3300);
PMU->enablePowerOutput(XPOWERS_ALDO3);
// m.2 interface
PMU->setPowerChannelVoltage(XPOWERS_DCDC3, 3300);
PMU->enablePowerOutput(XPOWERS_DCDC3);
/**
* ALDO2 cannot be turned off.
* It is a necessary condition for sensor communication.
* It must be turned on to properly access the sensor and screen
* It is also responsible for the power supply of PCF8563
*/
PMU->setPowerChannelVoltage(XPOWERS_ALDO2, 3300);
PMU->enablePowerOutput(XPOWERS_ALDO2);
// 6-axis , magnetometer ,bme280 , oled screen power channel
PMU->setPowerChannelVoltage(XPOWERS_ALDO1, 3300);
PMU->enablePowerOutput(XPOWERS_ALDO1);
// sdcard power channle
PMU->setPowerChannelVoltage(XPOWERS_BLDO1, 3300);
PMU->enablePowerOutput(XPOWERS_BLDO1);
// PMU->setPowerChannelVoltage(XPOWERS_DCDC4, 3300);
// PMU->enablePowerOutput(XPOWERS_DCDC4);
// not use channel
PMU->disablePowerOutput(XPOWERS_DCDC2); // not elicited
PMU->disablePowerOutput(XPOWERS_DCDC5); // not elicited
PMU->disablePowerOutput(XPOWERS_DLDO1); // Invalid power channel, it does not exist
PMU->disablePowerOutput(XPOWERS_DLDO2); // Invalid power channel, it does not exist
PMU->disablePowerOutput(XPOWERS_VBACKUP);
// Configure charging
PMU->setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V2);
PMU->setChargerConstantCurr(XPOWERS_AXP2101_CHG_CUR_500MA);
// TODO: Reset
PMU->setChargingLedMode(XPOWERS_CHG_LED_CTRL_CHG);
// Set the time of pressing the button to turn off
PMU->setPowerKeyPressOffTime(XPOWERS_POWEROFF_4S);
PMU->setPowerKeyPressOnTime(XPOWERS_POWERON_128MS);
// disable all axp chip interrupt
PMU->disableIRQ(XPOWERS_AXP2101_ALL_IRQ);
PMU->clearIrqStatus();
// It is necessary to disable the detection function of the TS pin on the board
// without the battery temperature detection function, otherwise it will cause abnormal charging
PMU->disableTSPinMeasure();
PMU->enableVbusVoltageMeasure();
PMU->enableBattVoltageMeasure();
return true;
#else
return false;

View File

@ -74,6 +74,8 @@ The RNode Firmware supports the following boards:
- Original v1.x RNodes from [unsigned.io](https://unsigned.io/shop/product/rnode)
- LilyGO T-Beam v1.1 devices with SX1276/8 LoRa chips
- LilyGO T-Beam v1.1 devices with SX1262/8 LoRa chips
- LilyGO T-Beam Supreme devices
- LilyGO T-Deck devices (currently display is disabled)
- LilyGO LoRa32 v1.0 devices
- LilyGO LoRa32 v2.0 devices
- LilyGO LoRa32 v2.1 devices (with and without TCXO)

View File

@ -94,7 +94,7 @@ void setup() {
led_init();
#endif
#if BOARD_MODEL != BOARD_RAK4631 && BOARD_MODEL != BOARD_RNODE_NG_22
#if BOARD_MODEL != BOARD_RAK4631 && BOARD_MODEL != BOARD_RNODE_NG_22 && BOARD_MODEL != BOARD_TBEAM_S_V1
// Some boards need to wait until the hardware UART is set up before booting
// the full firmware. In the case of the RAK4631, the line below will wait
// until a serial connection is actually established with a master. Thus, it

114
ROM.h
View File

@ -14,94 +14,40 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#ifndef ROM_H
#define ROM_H
#define ROM_H
#define CHECKSUMMED_SIZE 0x0B
#define CHECKSUMMED_SIZE 0x0B
// ROM address map ///////////////
#define ADDR_PRODUCT 0x00
#define ADDR_MODEL 0x01
#define ADDR_HW_REV 0x02
#define ADDR_SERIAL 0x03
#define ADDR_MADE 0x07
#define ADDR_CHKSUM 0x0B
#define ADDR_SIGNATURE 0x1B
#define ADDR_INFO_LOCK 0x9B
#define PRODUCT_RNODE 0x03 // Board code 0x31
#define MODEL_A4 0xA4 // RNode v1.0, 433 MHz
#define MODEL_A9 0xA9 // RNode v1.0, 868 MHz
#define ADDR_CONF_SF 0x9C
#define ADDR_CONF_CR 0x9D
#define ADDR_CONF_TXP 0x9E
#define ADDR_CONF_BW 0x9F
#define ADDR_CONF_FREQ 0xA3
#define ADDR_CONF_OK 0xA7
// Board code 0x40
#define MODEL_A3 0xA3 // RNode v2.0, 433 MHz
#define MODEL_A8 0xA8 // RNode v2.0, 868 MHz
#define ADDR_CONF_BT 0xB0
#define ADDR_CONF_DSET 0xB1
#define ADDR_CONF_DINT 0xB2
#define ADDR_CONF_DADR 0xB3
#define ADDR_CONF_DBLK 0xB4
#define ADDR_CONF_PSET 0xB5
#define ADDR_CONF_PINT 0xB6
#define ADDR_CONF_BSET 0xB7
// Board code 0x41
#define MODEL_A2 0xA2 // RNode v2.1, 433 MHz
#define MODEL_A7 0xA7 // RNode v2.1, 868 MHz
#define INFO_LOCK_BYTE 0x73
#define CONF_OK_BYTE 0x73
#define BT_ENABLE_BYTE 0x73
// Board code 0x42
#define MODEL_A1 0xA1 // RNode v2.2, 433 MHz
#define MODEL_A6 0xA6 // RNode v2.2, 868 MHz
#define PRODUCT_TBEAM 0xE0 // Board code 0x33
#define MODEL_E4 0xE4 // T-Beam SX1278, 433 Mhz
#define MODEL_E9 0xE9 // T-Beam SX1276, 868 Mhz
#define MODEL_E3 0xE3 // T-Beam SX1268, 433 Mhz
#define MODEL_E8 0xE8 // T-Beam SX1262, 868 Mhz
#define PRODUCT_TDECK_V1 0xD0 // Board code 0x3B
#define MODEL_D4 0xD4 // LilyGO T-Deck, 433 MHz
#define MODEL_D9 0xD9 // LilyGO T-Deck, 868 MHz
#define PRODUCT_T32_10 0xB2 // Board code 0x39
#define MODEL_BA 0xBA // LilyGO T3 v1.0, 433 MHz
#define MODEL_BB 0xBB // LilyGO T3 v1.0, 868 MHz
#define PRODUCT_T32_20 0xB0 // Board code 0x36
#define MODEL_B3 0xB3 // LilyGO T3 v2.0, 433 MHz
#define MODEL_B8 0xB8 // LilyGO T3 v2.0, 868 MHz
#define PRODUCT_T32_21 0xB1 // Board code 0x37
#define MODEL_B4 0xB4 // LilyGO T3 v2.1, 433 MHz
#define MODEL_B9 0xB9 // LilyGO T3 v2.1, 868 MHz
#define PRODUCT_H32_V2 0xC0 // Board code 0x38
#define MODEL_C4 0xC4 // Heltec Lora32 v2, 433 MHz
#define MODEL_C9 0xC9 // Heltec Lora32 v2, 868 MHz
#define PRODUCT_H32_V3 0xC1 // Board code 0x3A
#define MODEL_C5 0xC5 // Heltec Lora32 v3, 433 MHz
#define MODEL_CA 0xCA // Heltec Lora32 v3, 868 MHz
#define PRODUCT_RAK4631 0x10 // Board code 0x51
#define MODEL_11 0x11 // RAK4631, 433 Mhz
#define MODEL_12 0x12 // RAK4631, 868 Mhz
#define PRODUCT_HMBRW 0xF0 // Board code 0x32
#define MODEL_FE 0xFE // Homebrew board, max 17dBm output power
#define MODEL_FF 0xFF // Homebrew board, max 14dBm output power
#define ADDR_PRODUCT 0x00
#define ADDR_MODEL 0x01
#define ADDR_HW_REV 0x02
#define ADDR_SERIAL 0x03
#define ADDR_MADE 0x07
#define ADDR_CHKSUM 0x0B
#define ADDR_SIGNATURE 0x1B
#define ADDR_INFO_LOCK 0x9B
#define ADDR_CONF_SF 0x9C
#define ADDR_CONF_CR 0x9D
#define ADDR_CONF_TXP 0x9E
#define ADDR_CONF_BW 0x9F
#define ADDR_CONF_FREQ 0xA3
#define ADDR_CONF_OK 0xA7
#define ADDR_CONF_BT 0xB0
#define ADDR_CONF_DSET 0xB1
#define ADDR_CONF_DINT 0xB2
#define ADDR_CONF_DADR 0xB3
#define ADDR_CONF_DBLK 0xB4
#define ADDR_CONF_PSET 0xB5
#define ADDR_CONF_PINT 0xB6
#define ADDR_CONF_BSET 0xB7
#define INFO_LOCK_BYTE 0x73
#define CONF_OK_BYTE 0x73
#define BT_ENABLE_BYTE 0x73
#define EEPROM_RESERVED 200
#define EEPROM_RESERVED 200
//////////////////////////////////
#endif

View File

@ -190,6 +190,11 @@ uint8_t boot_vector = 0x00;
void led_rx_off() { }
void led_tx_on() { }
void led_tx_off() { }
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
void led_rx_on() { }
void led_rx_off() { }
void led_tx_on() { }
void led_tx_off() { }
#elif BOARD_MODEL == BOARD_LORA32_V1_0
#if defined(EXTERNAL_LEDS)
void led_rx_on() { digitalWrite(pin_led_rx, HIGH); }
@ -1106,6 +1111,9 @@ void setTXPower() {
if (model == MODEL_D4) LoRa->setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
if (model == MODEL_D9) LoRa->setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
if (model == MODEL_DB) LoRa->setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
if (model == MODEL_DC) LoRa->setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
if (model == MODEL_E4) LoRa->setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
if (model == MODEL_E9) LoRa->setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
if (model == MODEL_E3) LoRa->setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
@ -1327,7 +1335,7 @@ bool eeprom_product_valid() {
#if PLATFORM == PLATFORM_AVR
if (rval == PRODUCT_RNODE || rval == PRODUCT_HMBRW) {
#elif PLATFORM == PLATFORM_ESP32
if (rval == PRODUCT_RNODE || rval == BOARD_RNODE_NG_20 || rval == BOARD_RNODE_NG_21 || rval == PRODUCT_HMBRW || rval == PRODUCT_TBEAM || rval == PRODUCT_T32_10 || rval == PRODUCT_T32_20 || rval == PRODUCT_T32_21 || rval == PRODUCT_H32_V2 || rval == PRODUCT_H32_V3 || rval == PRODUCT_TDECK_V1) {
if (rval == PRODUCT_RNODE || rval == BOARD_RNODE_NG_20 || rval == BOARD_RNODE_NG_21 || rval == PRODUCT_HMBRW || rval == PRODUCT_TBEAM || rval == PRODUCT_T32_10 || rval == PRODUCT_T32_20 || rval == PRODUCT_T32_21 || rval == PRODUCT_H32_V2 || rval == PRODUCT_H32_V3 || rval == PRODUCT_TDECK_V1 || rval == PRODUCT_TBEAM_S_V1) {
#elif PLATFORM == PLATFORM_NRF52
if (rval == PRODUCT_RAK4631 || rval == PRODUCT_HMBRW) {
#else
@ -1359,6 +1367,8 @@ bool eeprom_model_valid() {
if (model == MODEL_E4 || model == MODEL_E9 || model == MODEL_E3 || model == MODEL_E8) {
#elif BOARD_MODEL == BOARD_TDECK
if (model == MODEL_D4 || model == MODEL_D9) {
#elif BOARD_MODEL == BOARD_TBEAM_S_V1
if (model == MODEL_DB || model == MODEL_DC) {
#elif BOARD_MODEL == BOARD_LORA32_V1_0
if (model == MODEL_BA || model == MODEL_BB) {
#elif BOARD_MODEL == BOARD_LORA32_V2_0

View File

@ -723,6 +723,8 @@ void sx126x::enableTCXO() {
uint8_t buf[4] = {MODE_TCXO_1_8V_6X, 0x00, 0x00, 0xFF};
#elif BOARD_MODEL == BOARD_TDECK
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
uint8_t buf[4] = {MODE_TCXO_1_8V_6X, 0x00, 0x00, 0xFF};
#endif