Skip to content

Commit 64248eb

Browse files
committed
Merge branch 'master' into head-tracker
# Conflicts: # lib/WIFI/devWIFI.cpp # targets/debug.ini
2 parents 476a6ad + e1dc6fb commit 64248eb

File tree

17 files changed

+28
-1016
lines changed

17 files changed

+28
-1016
lines changed

hardware/targets.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
"firmware": "ESP32C3_TX_Backpack",
1414
"upload_methods": ["uart", "etx", "passthru", "wifi"],
1515
"platform": "esp32-c3"
16-
},
17-
"stm": {
18-
"product_name": "ESP8285 Backpack for STM32-based TX module",
19-
"firmware": "STM_TX_Backpack",
20-
"upload_methods": ["uart", "wifi"],
21-
"platform": "esp8285"
2216
}
2317
}
2418
},
@@ -175,24 +169,12 @@
175169
"namimnorc": {
176170
"name": "NamimnoRC",
177171
"txbp": {
178-
"voyager_stm": {
179-
"product_name": "NamimnoRC Voyager 900MHz TX",
180-
"platform": "stm8285",
181-
"firmware": "STM_TX_Backpack",
182-
"upload_methods": ["uart", "wifi"]
183-
},
184172
"voyager": {
185173
"product_name": "NamimnoRC Voyager OLED 900MHz TX",
186174
"firmware": "ESP_TX_Backpack",
187175
"platform": "esp8285",
188176
"upload_methods": ["uart", "wifi"]
189177
},
190-
"flash_stm": {
191-
"product_name": "NamimnoRC Flash 2.4GHz TX",
192-
"platform": "stm8285",
193-
"firmware": "STM_TX_Backpack",
194-
"upload_methods": ["uart", "wifi"]
195-
},
196178
"flash": {
197179
"product_name": "NamimnoRC Flash OLED 2.4GHz TX",
198180
"firmware": "ESP_TX_Backpack",
@@ -298,6 +280,12 @@
298280
"firmware": "ESP32C3_TX_Backpack",
299281
"platform": "esp32-c3",
300282
"upload_methods": ["passthru", "wifi"]
283+
},
284+
"gx12": {
285+
"product_name": "RadioMaster GX12 Dual-Band Gemini-X TX",
286+
"firmware": "ESP32C3_TX_Backpack",
287+
"platform": "esp32-c3",
288+
"upload_methods": ["etx", "wifi"]
301289
}
302290
}
303291
},
@@ -352,7 +340,17 @@
352340
}
353341
}
354342
},
355-
343+
"hdzero-boxpro": {
344+
"name": "HDZero BoxPro Goggles",
345+
"vrx": {
346+
"esp32": {
347+
"product_name": "Built-in ESP32 Backpack",
348+
"firmware": "HDZero_Goggle_ESP32_Backpack",
349+
"upload_methods": ["wifi"],
350+
"platform": "esp32"
351+
}
352+
}
353+
},
356354
"rapidfire": {
357355
"name": "rapidFIRE Module",
358356
"vrx": {
@@ -584,4 +582,4 @@
584582
}
585583
}
586584
}
587-
}
585+
}

lib/EEPROM/elrs_eeprom.cpp

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,11 @@
11
#include "elrs_eeprom.h"
22
#include "logging.h"
3-
4-
#if defined(PLATFORM_STM32)
5-
#if TARGET_USE_EEPROM && \
6-
defined(GPIO_PIN_SDA) && (GPIO_PIN_SDA != UNDEF_PIN) && \
7-
defined(GPIO_PIN_SCL) && (GPIO_PIN_SCL != UNDEF_PIN)
8-
#if !defined(TARGET_EEPROM_ADDR)
9-
#define TARGET_EEPROM_ADDR 0x51
10-
#warning "!! Using default EEPROM address (0x51) !!"
11-
#endif
12-
13-
#include <Wire.h>
14-
#include <extEEPROM.h>
15-
extEEPROM EEPROM(kbits_2, 1, 1, TARGET_EEPROM_ADDR);
16-
#else
17-
#define STM32_USE_FLASH 1
18-
#include <stm32_eeprom.h>
19-
#endif
20-
#else
21-
#include <EEPROM.h>
22-
#endif
3+
#include <EEPROM.h>
234

245
void
256
ELRS_EEPROM::Begin()
267
{
27-
#if defined(PLATFORM_STM32)
28-
#if STM32_USE_FLASH
29-
eeprom_buffer_fill();
30-
#else // !STM32_USE_FLASH
31-
/* Initialize I2C */
32-
Wire.setSDA(GPIO_PIN_SDA);
33-
Wire.setSCL(GPIO_PIN_SCL);
34-
Wire.begin();
35-
/* Initialize EEPROM */
36-
EEPROM.begin(extEEPROM::twiClock100kHz, &Wire);
37-
#endif // STM32_USE_FLASH
38-
#else /* !PLATFORM_STM32 */
398
EEPROM.begin(RESERVED_EEPROM_SIZE);
40-
#endif /* PLATFORM_STM32 */
419
}
4210

4311
uint8_t
@@ -49,11 +17,7 @@ ELRS_EEPROM::ReadByte(const uint32_t address)
4917
ERRLN("EEPROM address is out of bounds");
5018
return 0;
5119
}
52-
#if STM32_USE_FLASH
53-
return eeprom_buffered_read_byte(address);
54-
#else
5520
return EEPROM.read(address);
56-
#endif
5721
}
5822

5923
void
@@ -65,22 +29,14 @@ ELRS_EEPROM::WriteByte(const uint32_t address, const uint8_t value)
6529
ERRLN("EEPROM address is out of bounds");
6630
return;
6731
}
68-
#if STM32_USE_FLASH
69-
eeprom_buffered_write_byte(address, value);
70-
#else
7132
EEPROM.write(address, value);
72-
#endif
7333
}
7434

7535
void
7636
ELRS_EEPROM::Commit()
7737
{
78-
#if defined(PLATFORM_ESP32) || defined(PLATFORM_ESP8266)
7938
if (!EEPROM.commit())
8039
{
8140
ERRLN("EEPROM commit failed");
8241
}
83-
#elif STM32_USE_FLASH
84-
eeprom_buffer_flush();
85-
#endif
8642
}

lib/STM32UPDATE/stk500.cpp

Lines changed: 0 additions & 184 deletions
This file was deleted.

0 commit comments

Comments
 (0)