diff --git a/software/firmware/source/SoftRF/src/platform/STM32.cpp b/software/firmware/source/SoftRF/src/platform/STM32.cpp index 80044c1f6..e359e2e84 100644 --- a/software/firmware/source/SoftRF/src/platform/STM32.cpp +++ b/software/firmware/source/SoftRF/src/platform/STM32.cpp @@ -53,7 +53,7 @@ lmic_pinmap lmic_pins = { .rst = SOC_GPIO_PIN_RST, .dio = {SOC_GPIO_PIN_DIO0, LMIC_UNUSED_PIN, LMIC_UNUSED_PIN}, #endif - .busy = LMIC_UNUSED_PIN, + .busy = SOC_GPIO_PIN_BUSY, .tcxo = LMIC_UNUSED_PIN, }; @@ -523,6 +523,10 @@ static void STM32_setup() } #endif /* ARDUINO_NUCLEO_L073RZ || ARDUINO_GENERIC_WLE5CCUX */ +#if defined(USE_RADIOLIB) + lmic_pins.dio[0] = SOC_GPIO_PIN_DIO0; +#endif /* USE_RADIOLIB */ + Serial.begin(SERIAL_OUT_BR, SERIAL_OUT_BITS); #if defined(USBD_USE_CDC) && !defined(DISABLE_GENERIC_SERIALUSB) diff --git a/software/firmware/source/SoftRF/src/platform/STM32.h b/software/firmware/source/SoftRF/src/platform/STM32.h index ffbb2ebf6..4febf96b7 100644 --- a/software/firmware/source/SoftRF/src/platform/STM32.h +++ b/software/firmware/source/SoftRF/src/platform/STM32.h @@ -44,10 +44,12 @@ extern char *dtostrf_workaround(double, signed char, unsigned char, char *); #define uni_Color(r,g,b) strip.Color(r,g,b) #define color_t uint32_t -#define yield() ({ }) #define snprintf_P snprintf #define EEPROM_commit() {} +//#define yield() ({ }) +inline void yield() { }; + #define AN3155_BR 115200 #define AN3155_BITS SERIAL_8E1 @@ -173,13 +175,16 @@ typedef struct stm32_backup_struct { //#define USE_OGN_ENCRYPTION #define EXCLUDE_LK8EX1 #define EXCLUDE_IMU +//#define USE_RADIOLIB //#define ENFORCE_S78G #define USE_TIME_SLOTS /* Experimental */ #define ENABLE_ADSL // + 2 kb +#if !defined(USE_RADIOLIB) #define ENABLE_PROL // + 18 kb +#endif /* USE_RADIOLIB */ /* Secondary target ("Blue pill") */ #elif defined(ARDUINO_BLUEPILL_F103CB) @@ -287,6 +292,7 @@ typedef struct stm32_backup_struct { #define USE_BASICMAC // + 7 kb #define EXCLUDE_SX1276 // - 3 kb +//#define USE_RADIOLIB #define USE_TIME_SLOTS #define USE_OGN_ENCRYPTION @@ -343,6 +349,7 @@ typedef struct stm32_backup_struct { #define USE_BASICMAC // + 7 kb #define EXCLUDE_SX1276 // - 3 kb +//#define USE_RADIOLIB #define USE_TIME_SLOTS diff --git a/software/firmware/source/SoftRF/src/platform/iomap/Blue_Pill.h b/software/firmware/source/SoftRF/src/platform/iomap/Blue_Pill.h index a62c2d719..f825f0973 100644 --- a/software/firmware/source/SoftRF/src/platform/iomap/Blue_Pill.h +++ b/software/firmware/source/SoftRF/src/platform/iomap/Blue_Pill.h @@ -32,6 +32,9 @@ #define SOC_GPIO_PIN_RST PB5 #define SOC_GPIO_PIN_DIO0 PB4 +/* SX1262 */ +#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN + /* RF antenna switch */ #define SOC_GPIO_PIN_ANT_RXTX LMIC_UNUSED_PIN diff --git a/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TMotion.h b/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TMotion.h index 0620a6446..628c52d53 100644 --- a/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TMotion.h +++ b/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TMotion.h @@ -41,6 +41,9 @@ #define SOC_GPIO_PIN_DIO4 PB3 #define SOC_GPIO_PIN_DIO5 PA15 +/* SX1262 */ +#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN + /* RF antenna switch */ #define SOC_GPIO_PIN_ANT_RXTX PA1 // 1:Rx, 0:Tx diff --git a/software/firmware/source/SoftRF/src/platform/iomap/Olimex_STM32WL.h b/software/firmware/source/SoftRF/src/platform/iomap/Olimex_STM32WL.h index 0d6533893..761545f2e 100644 --- a/software/firmware/source/SoftRF/src/platform/iomap/Olimex_STM32WL.h +++ b/software/firmware/source/SoftRF/src/platform/iomap/Olimex_STM32WL.h @@ -25,6 +25,7 @@ /* SX1262 */ #define SOC_GPIO_PIN_RST LMIC_UNUSED_PIN #define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN +#define SOC_GPIO_PIN_DIO0 LMIC_UNUSED_PIN #define SOC_GPIO_PIN_DIO1 LMIC_UNUSED_PIN /* RF antenna switch */ diff --git a/software/firmware/source/SoftRF/src/platform/iomap/RAK_3172.h b/software/firmware/source/SoftRF/src/platform/iomap/RAK_3172.h index f4afcd05a..d1536881b 100644 --- a/software/firmware/source/SoftRF/src/platform/iomap/RAK_3172.h +++ b/software/firmware/source/SoftRF/src/platform/iomap/RAK_3172.h @@ -26,6 +26,7 @@ /* SX1262 */ #define SOC_GPIO_PIN_RST LMIC_UNUSED_PIN #define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN +#define SOC_GPIO_PIN_DIO0 LMIC_UNUSED_PIN #define SOC_GPIO_PIN_DIO1 LMIC_UNUSED_PIN /* RF antenna switch */