Skip to content

Commit 844251d

Browse files
committed
[STM32] build with LR11XX driver
1 parent 72aa345 commit 844251d

File tree

6 files changed

+21
-2
lines changed

6 files changed

+21
-2
lines changed

software/firmware/source/SoftRF/src/platform/STM32.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ lmic_pinmap lmic_pins = {
5353
.rst = SOC_GPIO_PIN_RST,
5454
.dio = {SOC_GPIO_PIN_DIO0, LMIC_UNUSED_PIN, LMIC_UNUSED_PIN},
5555
#endif
56-
.busy = LMIC_UNUSED_PIN,
56+
.busy = SOC_GPIO_PIN_BUSY,
5757
.tcxo = LMIC_UNUSED_PIN,
5858
};
5959

@@ -523,6 +523,10 @@ static void STM32_setup()
523523
}
524524
#endif /* ARDUINO_NUCLEO_L073RZ || ARDUINO_GENERIC_WLE5CCUX */
525525

526+
#if defined(USE_RADIOLIB)
527+
lmic_pins.dio[0] = SOC_GPIO_PIN_DIO0;
528+
#endif /* USE_RADIOLIB */
529+
526530
Serial.begin(SERIAL_OUT_BR, SERIAL_OUT_BITS);
527531

528532
#if defined(USBD_USE_CDC) && !defined(DISABLE_GENERIC_SERIALUSB)

software/firmware/source/SoftRF/src/platform/STM32.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ extern char *dtostrf_workaround(double, signed char, unsigned char, char *);
4444
#define uni_Color(r,g,b) strip.Color(r,g,b)
4545
#define color_t uint32_t
4646

47-
#define yield() ({ })
4847
#define snprintf_P snprintf
4948
#define EEPROM_commit() {}
5049

50+
//#define yield() ({ })
51+
inline void yield() { };
52+
5153
#define AN3155_BR 115200
5254
#define AN3155_BITS SERIAL_8E1
5355

@@ -173,13 +175,16 @@ typedef struct stm32_backup_struct {
173175
//#define USE_OGN_ENCRYPTION
174176
#define EXCLUDE_LK8EX1
175177
#define EXCLUDE_IMU
178+
//#define USE_RADIOLIB
176179

177180
//#define ENFORCE_S78G
178181
#define USE_TIME_SLOTS
179182

180183
/* Experimental */
181184
#define ENABLE_ADSL // + 2 kb
185+
#if !defined(USE_RADIOLIB)
182186
#define ENABLE_PROL // + 18 kb
187+
#endif /* USE_RADIOLIB */
183188

184189
/* Secondary target ("Blue pill") */
185190
#elif defined(ARDUINO_BLUEPILL_F103CB)
@@ -287,6 +292,7 @@ typedef struct stm32_backup_struct {
287292

288293
#define USE_BASICMAC // + 7 kb
289294
#define EXCLUDE_SX1276 // - 3 kb
295+
//#define USE_RADIOLIB
290296

291297
#define USE_TIME_SLOTS
292298
#define USE_OGN_ENCRYPTION
@@ -343,6 +349,7 @@ typedef struct stm32_backup_struct {
343349

344350
#define USE_BASICMAC // + 7 kb
345351
#define EXCLUDE_SX1276 // - 3 kb
352+
//#define USE_RADIOLIB
346353

347354
#define USE_TIME_SLOTS
348355

software/firmware/source/SoftRF/src/platform/iomap/Blue_Pill.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#define SOC_GPIO_PIN_RST PB5
3333
#define SOC_GPIO_PIN_DIO0 PB4
3434

35+
/* SX1262 */
36+
#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN
37+
3538
/* RF antenna switch */
3639
#define SOC_GPIO_PIN_ANT_RXTX LMIC_UNUSED_PIN
3740

software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TMotion.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
#define SOC_GPIO_PIN_DIO4 PB3
4242
#define SOC_GPIO_PIN_DIO5 PA15
4343

44+
/* SX1262 */
45+
#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN
46+
4447
/* RF antenna switch */
4548
#define SOC_GPIO_PIN_ANT_RXTX PA1 // 1:Rx, 0:Tx
4649

software/firmware/source/SoftRF/src/platform/iomap/Olimex_STM32WL.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
/* SX1262 */
2626
#define SOC_GPIO_PIN_RST LMIC_UNUSED_PIN
2727
#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN
28+
#define SOC_GPIO_PIN_DIO0 LMIC_UNUSED_PIN
2829
#define SOC_GPIO_PIN_DIO1 LMIC_UNUSED_PIN
2930

3031
/* RF antenna switch */

software/firmware/source/SoftRF/src/platform/iomap/RAK_3172.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
/* SX1262 */
2727
#define SOC_GPIO_PIN_RST LMIC_UNUSED_PIN
2828
#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN
29+
#define SOC_GPIO_PIN_DIO0 LMIC_UNUSED_PIN
2930
#define SOC_GPIO_PIN_DIO1 LMIC_UNUSED_PIN
3031

3132
/* RF antenna switch */

0 commit comments

Comments
 (0)