From dab68bf54f0ee6cb4370e26755724dbaac27fb31 Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Wed, 11 Dec 2024 13:53:15 +0300 Subject: [PATCH] [EFR32] build with LR11XX driver --- software/firmware/source/SoftRF/src/platform/EFR32.h | 4 ++-- software/firmware/source/libraries/RadioLib/src/BuildOpt.h | 7 +++++++ .../source/libraries/arduino-basicmac/src/hal/hal.cpp | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/software/firmware/source/SoftRF/src/platform/EFR32.h b/software/firmware/source/SoftRF/src/platform/EFR32.h index 98cc47b4c..2c8a9235f 100644 --- a/software/firmware/source/SoftRF/src/platform/EFR32.h +++ b/software/firmware/source/SoftRF/src/platform/EFR32.h @@ -161,9 +161,9 @@ struct rst_info { #define EXCLUDE_OLED_049 //#define EXCLUDE_OLED_BARO_PAGE -//#define USE_BASICMAC +#define USE_BASICMAC //#define EXCLUDE_SX1276 // - 3 kb -//#define USE_RADIOLIB +#define USE_RADIOLIB #define USE_TIME_SLOTS #define USE_OGN_ENCRYPTION diff --git a/software/firmware/source/libraries/RadioLib/src/BuildOpt.h b/software/firmware/source/libraries/RadioLib/src/BuildOpt.h index e2c26adac..e165f28f7 100644 --- a/software/firmware/source/libraries/RadioLib/src/BuildOpt.h +++ b/software/firmware/source/libraries/RadioLib/src/BuildOpt.h @@ -366,6 +366,13 @@ #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus) #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus) +#elif defined(ARDUINO_ARCH_SILABS) + // Silicon Labs Arduino + #define RADIOLIB_PLATFORM "Arduino Silicon Labs" + #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode) + #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus) + #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus) + #else // other Arduino platforms not covered by the above list - this may or may not work #define RADIOLIB_PLATFORM "Unknown Arduino" diff --git a/software/firmware/source/libraries/arduino-basicmac/src/hal/hal.cpp b/software/firmware/source/libraries/arduino-basicmac/src/hal/hal.cpp index f41a28f30..c15f8c7c3 100644 --- a/software/firmware/source/libraries/arduino-basicmac/src/hal/hal.cpp +++ b/software/firmware/source/libraries/arduino-basicmac/src/hal/hal.cpp @@ -564,7 +564,8 @@ u1_t hal_checkTimer (u4_t time) { defined(RASPBERRY_PI) || defined(ARDUINO_ARCH_SAMD) || \ defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_ARCH_ASR6601) || \ defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350) || \ - defined(ARDUINO_ARCH_RENESAS) || defined(ARDUINO_ARCH_CH32) + defined(ARDUINO_ARCH_RENESAS) || defined(ARDUINO_ARCH_SILABS) || \ + defined(ARDUINO_ARCH_CH32) // Fix for STM32 HAL based cores.