From 60a874affbe6bb7e0ccbdb9a87ff508355e97937 Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Wed, 11 Dec 2024 14:45:35 +0300 Subject: [PATCH] [RA4M1] build with LR11XX driver --- software/firmware/source/SoftRF/src/platform/RA4M1.cpp | 6 +++++- software/firmware/source/SoftRF/src/platform/RA4M1.h | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/software/firmware/source/SoftRF/src/platform/RA4M1.cpp b/software/firmware/source/SoftRF/src/platform/RA4M1.cpp index b38fc5f77..a072dae78 100644 --- a/software/firmware/source/SoftRF/src/platform/RA4M1.cpp +++ b/software/firmware/source/SoftRF/src/platform/RA4M1.cpp @@ -48,7 +48,7 @@ lmic_pinmap lmic_pins = { .rxe = LMIC_UNUSED_PIN, .rst = SOC_GPIO_PIN_RST, .dio = {LMIC_UNUSED_PIN, LMIC_UNUSED_PIN, LMIC_UNUSED_PIN}, - .busy = LMIC_UNUSED_PIN, + .busy = SOC_GPIO_PIN_BUSY, .tcxo = LMIC_UNUSED_PIN, }; @@ -132,6 +132,10 @@ static void RA4M1_setup() reset_info.reason = REASON_EXT_SYS_RST; } +#if defined(USE_RADIOLIB) + lmic_pins.dio[0] = SOC_GPIO_PIN_DIO1; +#endif /* USE_RADIOLIB */ + #if SOC_GPIO_RADIO_LED_TX != SOC_UNUSED_PIN pinMode(SOC_GPIO_RADIO_LED_TX, OUTPUT); digitalWrite(SOC_GPIO_RADIO_LED_TX, ! LED_STATE_ON); diff --git a/software/firmware/source/SoftRF/src/platform/RA4M1.h b/software/firmware/source/SoftRF/src/platform/RA4M1.h index 01d1aee35..0cac5a595 100644 --- a/software/firmware/source/SoftRF/src/platform/RA4M1.h +++ b/software/firmware/source/SoftRF/src/platform/RA4M1.h @@ -124,7 +124,7 @@ extern SoftSPI RadioSPI; /* SX1276 */ #define SOC_GPIO_PIN_RST PIN_D9 -#define SOC_GPIO_PIN_BUSY SOC_UNUSED_PIN +#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN #define SOC_GPIO_PIN_DIO1 PIN_D6 /* RF antenna switch */ @@ -206,6 +206,9 @@ extern SoftSPI RadioSPI; //#define USE_BASICMAC //#define EXCLUDE_SX1276 // - 3 kb +#if defined(ARDUINO_UNOR4_MINIMA) +#define USE_RADIOLIB +#endif /* ARDUINO_UNOR4_MINIMA */ #if defined(EXCLUDE_WIFI) #define USE_OLED /* -1.5K HEAP */