mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2026-04-27 22:35:36 +00:00
Self-provisioning, visible-tile-only updates, cleanup dead async code
T-Watch self-provisions EEPROM on first boot (blank flash recovery). Writes product/model/hwrev so the firmware can initialize without rnodeconf. Full cryptographic provisioning still requires rnodeconf with T-Watch product code support (not yet upstream). GUI updates only format labels for the currently visible tile — GPS float formatting (%.6f) skipped when GPS screen not shown, radio/battery labels skipped when not on those screens. Removed dead async DMA code from CO5300.h (spi_device_queue_trans doesn't work on ESP32-S3 SPI3 with this driver version). Removed SPI mutex from sx126x.cpp (unnecessary with exclusive SD/LoRa mode switching). SharedSPI.h retained for IMULogger/Gui SD card access coordination.
This commit is contained in:
parent
4564eb9980
commit
c3b22f36e8
1 changed files with 20 additions and 0 deletions
|
|
@ -123,6 +123,26 @@ void setup() {
|
|||
EEPROM.begin(EEPROM_SIZE);
|
||||
Serial.setRxBufferSize(CONFIG_UART_BUFFER_SIZE);
|
||||
|
||||
// T-Watch Ultra: self-provision if EEPROM is blank (after flash erase)
|
||||
#if BOARD_MODEL == BOARD_TWATCH_ULT
|
||||
if (EEPROM.read(eeprom_addr(ADDR_PRODUCT)) == 0xFF) {
|
||||
EEPROM.write(eeprom_addr(ADDR_PRODUCT), PRODUCT_TWATCH_ULT);
|
||||
EEPROM.write(eeprom_addr(ADDR_MODEL), MODEL_DA); // 868 MHz
|
||||
EEPROM.write(eeprom_addr(ADDR_HW_REV), 0x01);
|
||||
EEPROM.write(eeprom_addr(ADDR_SERIAL), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_SERIAL+1), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_SERIAL+2), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_SERIAL+3), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_MADE), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_MADE+1), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_MADE+2), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_MADE+3), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_INFO_LOCK), 0x00);
|
||||
EEPROM.write(eeprom_addr(ADDR_CONF_OK), CONF_OK_BYTE);
|
||||
EEPROM.commit();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BOARD_MODEL == BOARD_TDECK
|
||||
pinMode(pin_poweron, OUTPUT);
|
||||
digitalWrite(pin_poweron, HIGH);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue