From 3563e7257ac3fc9801fea21dd773cc3d8685a42b Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Wed, 5 Feb 2025 13:23:36 +0300 Subject: [PATCH] a fix for build with Arduino Core for Zephyr OS for Nano 33 BLE and Portenta H7 targets --- src/BuildOpt.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BuildOpt.h b/src/BuildOpt.h index 89c26853..297a91e4 100644 --- a/src/BuildOpt.h +++ b/src/BuildOpt.h @@ -264,20 +264,24 @@ #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus) #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus) + #if defined(ARDUINO_ARCH_MBED) // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds #define RADIOLIB_TONE_UNSUPPORTED #define RADIOLIB_MBED_TONE_OVERRIDE + #endif -#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) +#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7) // Arduino Portenta H7 #define RADIOLIB_PLATFORM "Portenta H7" #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode) #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus) #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus) + #if defined(ARDUINO_ARCH_MBED) // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds #define RADIOLIB_TONE_UNSUPPORTED #define RADIOLIB_MBED_TONE_OVERRIDE + #endif #elif defined(__STM32F4__) || defined(__STM32F1__) // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)