Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions hardware/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
"firmware": "ESP32C3_TX_Backpack",
"upload_methods": ["uart", "etx", "passthru", "wifi"],
"platform": "esp32-c3"
},
"stm": {
"product_name": "ESP8285 Backpack for STM32-based TX module",
"firmware": "STM_TX_Backpack",
"upload_methods": ["uart", "wifi"],
"platform": "esp8285"
}
}
},
Expand Down Expand Up @@ -175,24 +169,12 @@
"namimnorc": {
"name": "NamimnoRC",
"txbp": {
"voyager_stm": {
"product_name": "NamimnoRC Voyager 900MHz TX",
"platform": "stm8285",
"firmware": "STM_TX_Backpack",
"upload_methods": ["uart", "wifi"]
},
"voyager": {
"product_name": "NamimnoRC Voyager OLED 900MHz TX",
"firmware": "ESP_TX_Backpack",
"platform": "esp8285",
"upload_methods": ["uart", "wifi"]
},
"flash_stm": {
"product_name": "NamimnoRC Flash 2.4GHz TX",
"platform": "stm8285",
"firmware": "STM_TX_Backpack",
"upload_methods": ["uart", "wifi"]
},
"flash": {
"product_name": "NamimnoRC Flash OLED 2.4GHz TX",
"firmware": "ESP_TX_Backpack",
Expand Down
46 changes: 1 addition & 45 deletions lib/EEPROM/elrs_eeprom.cpp
Original file line number Diff line number Diff line change
@@ -1,43 +1,11 @@
#include "elrs_eeprom.h"
#include "logging.h"

#if defined(PLATFORM_STM32)
#if TARGET_USE_EEPROM && \
defined(GPIO_PIN_SDA) && (GPIO_PIN_SDA != UNDEF_PIN) && \
defined(GPIO_PIN_SCL) && (GPIO_PIN_SCL != UNDEF_PIN)
#if !defined(TARGET_EEPROM_ADDR)
#define TARGET_EEPROM_ADDR 0x51
#warning "!! Using default EEPROM address (0x51) !!"
#endif

#include <Wire.h>
#include <extEEPROM.h>
extEEPROM EEPROM(kbits_2, 1, 1, TARGET_EEPROM_ADDR);
#else
#define STM32_USE_FLASH 1
#include <stm32_eeprom.h>
#endif
#else
#include <EEPROM.h>
#endif
#include <EEPROM.h>

void
ELRS_EEPROM::Begin()
{
#if defined(PLATFORM_STM32)
#if STM32_USE_FLASH
eeprom_buffer_fill();
#else // !STM32_USE_FLASH
/* Initialize I2C */
Wire.setSDA(GPIO_PIN_SDA);
Wire.setSCL(GPIO_PIN_SCL);
Wire.begin();
/* Initialize EEPROM */
EEPROM.begin(extEEPROM::twiClock100kHz, &Wire);
#endif // STM32_USE_FLASH
#else /* !PLATFORM_STM32 */
EEPROM.begin(RESERVED_EEPROM_SIZE);
#endif /* PLATFORM_STM32 */
}

uint8_t
Expand All @@ -49,11 +17,7 @@ ELRS_EEPROM::ReadByte(const uint32_t address)
ERRLN("EEPROM address is out of bounds");
return 0;
}
#if STM32_USE_FLASH
return eeprom_buffered_read_byte(address);
#else
return EEPROM.read(address);
#endif
}

void
Expand All @@ -65,22 +29,14 @@ ELRS_EEPROM::WriteByte(const uint32_t address, const uint8_t value)
ERRLN("EEPROM address is out of bounds");
return;
}
#if STM32_USE_FLASH
eeprom_buffered_write_byte(address, value);
#else
EEPROM.write(address, value);
#endif
}

void
ELRS_EEPROM::Commit()
{
#if defined(PLATFORM_ESP32) || defined(PLATFORM_ESP8266)
if (!EEPROM.commit())
{
ERRLN("EEPROM commit failed");
}
#elif STM32_USE_FLASH
eeprom_buffer_flush();
#endif
}
184 changes: 0 additions & 184 deletions lib/STM32UPDATE/stk500.cpp

This file was deleted.

72 changes: 0 additions & 72 deletions lib/STM32UPDATE/stk500.h

This file was deleted.

Loading