diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html
index 027eff39..cd4c742a 100644
--- a/_build_opt_8h_source.html
+++ b/_build_opt_8h_source.html
@@ -84,7 +84,7 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html','');});
BuildOpt.h
-
1 #ifndef _RADIOLIB_BUILD_OPTIONS_H 2 #define _RADIOLIB_BUILD_OPTIONS_H 7 #error "Unsupported Arduino version (< 1.0.0)" 37 #if defined(RADIOLIB_CUSTOM_PLATFORM) 39 #define RADIOLIB_PLATFORM "Custom" 42 #define RADIOLIB_PIN_TYPE uint8_t 43 #define RADIOLIB_PIN_MODE uint8_t 44 #define RADIOLIB_PIN_STATUS uint8_t 45 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 46 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 47 #define RADIOLIB_NC (0xFF) 48 #define RADIOLIB_DEFAULT_SPI SPI 49 #define RADIOLIB_PROGMEM PROGMEM 50 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 88 #if defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR)) 90 #define RADIOLIB_PLATFORM "Arduino AVR" 91 #define RADIOLIB_PIN_TYPE uint8_t 92 #define RADIOLIB_PIN_MODE uint8_t 93 #define RADIOLIB_PIN_STATUS uint8_t 94 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 95 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 96 #define RADIOLIB_NC (0xFF) 97 #define RADIOLIB_DEFAULT_SPI SPI 98 #define RADIOLIB_PROGMEM PROGMEM 99 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 101 #elif defined(ESP8266) 103 #define RADIOLIB_PLATFORM "ESP8266" 104 #define RADIOLIB_PIN_TYPE uint8_t 105 #define RADIOLIB_PIN_MODE uint8_t 106 #define RADIOLIB_PIN_STATUS uint8_t 107 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 108 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 109 #define RADIOLIB_NC (0xFF) 110 #define RADIOLIB_DEFAULT_SPI SPI 111 #define RADIOLIB_PROGMEM PROGMEM 112 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 115 #define RADIOLIB_EXCLUDE_ESP8266 119 #define RADIOLIB_PLATFORM "ESP32" 120 #define RADIOLIB_PIN_TYPE uint8_t 121 #define RADIOLIB_PIN_MODE uint8_t 122 #define RADIOLIB_PIN_STATUS uint8_t 123 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 124 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 125 #define RADIOLIB_NC (0xFF) 126 #define RADIOLIB_DEFAULT_SPI SPI 127 #define RADIOLIB_PROGMEM PROGMEM 128 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 129 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 130 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 133 #define RADIOLIB_TONE_UNSUPPORTED 134 #define RADIOLIB_TONE_ESP32_CHANNEL (1) 136 #elif defined(ARDUINO_ARCH_STM32) 138 #define RADIOLIB_PLATFORM "Arduino STM32 (official)" 139 #define RADIOLIB_PIN_TYPE uint32_t 140 #define RADIOLIB_PIN_MODE uint32_t 141 #define RADIOLIB_PIN_STATUS uint32_t 142 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 143 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(digitalPinToPinName(p)) 144 #define RADIOLIB_NC (0xFFFFFFFF) 145 #define RADIOLIB_DEFAULT_SPI SPI 146 #define RADIOLIB_PROGMEM PROGMEM 147 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 148 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 149 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 151 #elif defined(ARDUINO_ARCH_SAMD) 153 #define RADIOLIB_PLATFORM "Arduino SAMD" 154 #define RADIOLIB_PIN_TYPE pin_size_t 155 #define RADIOLIB_PIN_MODE PinMode 156 #define RADIOLIB_PIN_STATUS PinStatus 157 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 158 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 159 #define RADIOLIB_NC (0xFF) 160 #define RADIOLIB_DEFAULT_SPI SPI 161 #define RADIOLIB_PROGMEM PROGMEM 162 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 163 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 164 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 166 #elif defined(SAMD_SERIES) 168 #define RADIOLIB_PLATFORM "Adafruit SAMD" 169 #define RADIOLIB_PIN_TYPE uint32_t 170 #define RADIOLIB_PIN_MODE uint32_t 171 #define RADIOLIB_PIN_STATUS uint32_t 172 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 173 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 174 #define RADIOLIB_NC (0xFFFFFFFF) 175 #define RADIOLIB_DEFAULT_SPI SPI 176 #define RADIOLIB_PROGMEM PROGMEM 177 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 178 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 179 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 181 #elif defined(__SAM3X8E__) 183 #define RADIOLIB_PLATFORM "Arduino Due" 184 #define RADIOLIB_PIN_TYPE uint32_t 185 #define RADIOLIB_PIN_MODE uint32_t 186 #define RADIOLIB_PIN_STATUS uint32_t 187 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 188 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 189 #define RADIOLIB_NC (0xFFFFFFFF) 190 #define RADIOLIB_DEFAULT_SPI SPI 191 #define RADIOLIB_PROGMEM PROGMEM 192 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 193 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 194 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 195 #define RADIOLIB_TONE_UNSUPPORTED 197 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE) 199 #define RADIOLIB_PLATFORM "Adafruit nRF52" 200 #define RADIOLIB_PIN_TYPE uint32_t 201 #define RADIOLIB_PIN_MODE uint32_t 202 #define RADIOLIB_PIN_STATUS uint32_t 203 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 204 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 205 #define RADIOLIB_NC (0xFFFFFFFF) 206 #define RADIOLIB_DEFAULT_SPI SPI 207 #define RADIOLIB_PROGMEM PROGMEM 208 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 210 #elif defined(ARDUINO_ARC32_TOOLS) 212 #define RADIOLIB_PLATFORM "Intel Curie" 213 #define RADIOLIB_PIN_TYPE uint8_t 214 #define RADIOLIB_PIN_MODE uint8_t 215 #define RADIOLIB_PIN_STATUS uint8_t 216 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 217 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 218 #define RADIOLIB_NC (0xFF) 219 #define RADIOLIB_DEFAULT_SPI SPI 220 #define RADIOLIB_PROGMEM PROGMEM 221 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 223 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) 225 #define RADIOLIB_PLATFORM "Arduino megaAVR" 226 #define RADIOLIB_PIN_TYPE uint8_t 227 #define RADIOLIB_PIN_MODE PinMode 228 #define RADIOLIB_PIN_STATUS PinStatus 229 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 230 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 231 #define RADIOLIB_NC (0xFF) 232 #define RADIOLIB_DEFAULT_SPI SPI 233 #define RADIOLIB_PROGMEM PROGMEM 234 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 236 #elif defined(AM_PART_APOLLO3) 238 #define RADIOLIB_PLATFORM "Sparkfun Artemis" 239 #define RADIOLIB_PIN_TYPE uint8_t 240 #define RADIOLIB_PIN_MODE uint8_t 241 #define RADIOLIB_PIN_STATUS uint8_t 242 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 243 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 244 #define RADIOLIB_NC (0xFF) 245 #define RADIOLIB_DEFAULT_SPI SPI 246 #define RADIOLIB_PROGMEM PROGMEM 247 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 248 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 249 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 251 #elif defined(ARDUINO_ARDUINO_NANO33BLE) 253 #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE" 254 #define RADIOLIB_PIN_TYPE pin_size_t 255 #define RADIOLIB_PIN_MODE PinMode 256 #define RADIOLIB_PIN_STATUS PinStatus 257 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 258 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 259 #define RADIOLIB_NC (0xFF) 260 #define RADIOLIB_DEFAULT_SPI SPI 261 #define RADIOLIB_PROGMEM PROGMEM 262 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 263 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 264 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 267 #define RADIOLIB_EXCLUDE_ESP8266 269 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) 271 #define RADIOLIB_PLATFORM "Portenta H7" 272 #define RADIOLIB_PIN_TYPE pin_size_t 273 #define RADIOLIB_PIN_MODE PinMode 274 #define RADIOLIB_PIN_STATUS PinStatus 275 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 276 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 277 #define RADIOLIB_NC (0xFF) 278 #define RADIOLIB_DEFAULT_SPI SPI 279 #define RADIOLIB_PROGMEM PROGMEM 280 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 281 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 282 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 285 #define RADIOLIB_EXCLUDE_ESP8266 287 #elif defined(__STM32F4__) || defined(__STM32F1__) 289 #define RADIOLIB_PLATFORM "STM32duino (unofficial)" 290 #define RADIOLIB_PIN_TYPE uint8_t 291 #define RADIOLIB_PIN_MODE WiringPinMode 292 #define RADIOLIB_PIN_STATUS uint8_t 293 #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode 294 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 295 #define RADIOLIB_NC (0xFF) 296 #define RADIOLIB_DEFAULT_SPI SPI 297 #define RADIOLIB_PROGMEM PROGMEM 298 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 299 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 300 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 302 #elif defined(ARDUINO_ARCH_MEGAAVR) 304 #define RADIOLIB_PLATFORM "MegaCoreX" 305 #define RADIOLIB_PIN_TYPE uint8_t 306 #define RADIOLIB_PIN_MODE uint8_t 307 #define RADIOLIB_PIN_STATUS uint8_t 308 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 309 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 310 #define RADIOLIB_NC (0xFF) 311 #define RADIOLIB_DEFAULT_SPI SPI 312 #define RADIOLIB_PROGMEM PROGMEM 313 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 317 #define RADIOLIB_PLATFORM "Unknown" 318 #define RADIOLIB_UNKNOWN_PLATFORM 319 #define RADIOLIB_PIN_TYPE uint8_t 320 #define RADIOLIB_PIN_MODE uint8_t 321 #define RADIOLIB_PIN_STATUS uint8_t 322 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 323 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 324 #define RADIOLIB_NC (0xFF) 325 #define RADIOLIB_DEFAULT_SPI SPI 326 #define RADIOLIB_PROGMEM PROGMEM 327 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 344 #define RADIOLIB_DEBUG_PORT Serial 346 #if defined(RADIOLIB_DEBUG) 347 #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); } 348 #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); } 350 #define RADIOLIB_DEBUG_PRINT(...) {} 351 #define RADIOLIB_DEBUG_PRINTLN(...) {} 354 #if defined(RADIOLIB_VERBOSE) 355 #define RADIOLIB_VERBOSE_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); } 356 #define RADIOLIB_VERBOSE_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); } 358 #define RADIOLIB_VERBOSE_PRINT(...) {} 359 #define RADIOLIB_VERBOSE_PRINTLN(...) {} 382 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE) 383 #define RADIOLIB_STATIC_ARRAY_SIZE 256 389 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != ERR_NONE) { return(STATEVAR); } } 394 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } } 398 #define RADIOLIB_VERSION_MAJOR (0x04) 399 #define RADIOLIB_VERSION_MINOR (0x01) 400 #define RADIOLIB_VERSION_PATCH (0x00) 401 #define RADIOLIB_VERSION_EXTRA (0x00) 403 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+ 1 #ifndef _RADIOLIB_BUILD_OPTIONS_H 2 #define _RADIOLIB_BUILD_OPTIONS_H 7 #error "Unsupported Arduino version (< 1.0.0)" 37 #if defined(RADIOLIB_CUSTOM_PLATFORM) 39 #define RADIOLIB_PLATFORM "Custom" 42 #define RADIOLIB_PIN_TYPE uint8_t 43 #define RADIOLIB_PIN_MODE uint8_t 44 #define RADIOLIB_PIN_STATUS uint8_t 45 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 46 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 47 #define RADIOLIB_NC (0xFF) 48 #define RADIOLIB_DEFAULT_SPI SPI 49 #define RADIOLIB_PROGMEM PROGMEM 50 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 88 #if defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR)) 90 #define RADIOLIB_PLATFORM "Arduino AVR" 91 #define RADIOLIB_PIN_TYPE uint8_t 92 #define RADIOLIB_PIN_MODE uint8_t 93 #define RADIOLIB_PIN_STATUS uint8_t 94 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 95 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 96 #define RADIOLIB_NC (0xFF) 97 #define RADIOLIB_DEFAULT_SPI SPI 98 #define RADIOLIB_PROGMEM PROGMEM 99 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 101 #elif defined(ESP8266) 103 #define RADIOLIB_PLATFORM "ESP8266" 104 #define RADIOLIB_PIN_TYPE uint8_t 105 #define RADIOLIB_PIN_MODE uint8_t 106 #define RADIOLIB_PIN_STATUS uint8_t 107 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 108 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 109 #define RADIOLIB_NC (0xFF) 110 #define RADIOLIB_DEFAULT_SPI SPI 111 #define RADIOLIB_PROGMEM PROGMEM 112 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 115 #define RADIOLIB_EXCLUDE_ESP8266 119 #define RADIOLIB_PLATFORM "ESP32" 120 #define RADIOLIB_PIN_TYPE uint8_t 121 #define RADIOLIB_PIN_MODE uint8_t 122 #define RADIOLIB_PIN_STATUS uint8_t 123 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 124 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 125 #define RADIOLIB_NC (0xFF) 126 #define RADIOLIB_DEFAULT_SPI SPI 127 #define RADIOLIB_PROGMEM PROGMEM 128 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 129 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 130 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 133 #define RADIOLIB_TONE_UNSUPPORTED 134 #define RADIOLIB_TONE_ESP32_CHANNEL (1) 136 #elif defined(ARDUINO_ARCH_STM32) 138 #define RADIOLIB_PLATFORM "Arduino STM32 (official)" 139 #define RADIOLIB_PIN_TYPE uint32_t 140 #define RADIOLIB_PIN_MODE uint32_t 141 #define RADIOLIB_PIN_STATUS uint32_t 142 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 143 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(digitalPinToPinName(p)) 144 #define RADIOLIB_NC (0xFFFFFFFF) 145 #define RADIOLIB_DEFAULT_SPI SPI 146 #define RADIOLIB_PROGMEM PROGMEM 147 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 148 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 149 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 151 #elif defined(SAMD_SERIES) 153 #define RADIOLIB_PLATFORM "Adafruit SAMD" 154 #define RADIOLIB_PIN_TYPE uint32_t 155 #define RADIOLIB_PIN_MODE uint32_t 156 #define RADIOLIB_PIN_STATUS uint32_t 157 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 158 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 159 #define RADIOLIB_NC (0xFFFFFFFF) 160 #define RADIOLIB_DEFAULT_SPI SPI 161 #define RADIOLIB_PROGMEM PROGMEM 162 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 163 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 164 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 166 #elif defined(ARDUINO_ARCH_SAMD) 168 #define RADIOLIB_PLATFORM "Arduino SAMD" 169 #define RADIOLIB_PIN_TYPE pin_size_t 170 #define RADIOLIB_PIN_MODE PinMode 171 #define RADIOLIB_PIN_STATUS PinStatus 172 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 173 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 174 #define RADIOLIB_NC (0xFF) 175 #define RADIOLIB_DEFAULT_SPI SPI 176 #define RADIOLIB_PROGMEM PROGMEM 177 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 178 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 179 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 181 #elif defined(__SAM3X8E__) 183 #define RADIOLIB_PLATFORM "Arduino Due" 184 #define RADIOLIB_PIN_TYPE uint32_t 185 #define RADIOLIB_PIN_MODE uint32_t 186 #define RADIOLIB_PIN_STATUS uint32_t 187 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 188 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 189 #define RADIOLIB_NC (0xFFFFFFFF) 190 #define RADIOLIB_DEFAULT_SPI SPI 191 #define RADIOLIB_PROGMEM PROGMEM 192 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 193 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 194 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 195 #define RADIOLIB_TONE_UNSUPPORTED 197 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE) 199 #define RADIOLIB_PLATFORM "Adafruit nRF52" 200 #define RADIOLIB_PIN_TYPE uint32_t 201 #define RADIOLIB_PIN_MODE uint32_t 202 #define RADIOLIB_PIN_STATUS uint32_t 203 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 204 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 205 #define RADIOLIB_NC (0xFFFFFFFF) 206 #define RADIOLIB_DEFAULT_SPI SPI 207 #define RADIOLIB_PROGMEM PROGMEM 208 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 210 #elif defined(ARDUINO_ARC32_TOOLS) 212 #define RADIOLIB_PLATFORM "Intel Curie" 213 #define RADIOLIB_PIN_TYPE uint8_t 214 #define RADIOLIB_PIN_MODE uint8_t 215 #define RADIOLIB_PIN_STATUS uint8_t 216 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 217 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 218 #define RADIOLIB_NC (0xFF) 219 #define RADIOLIB_DEFAULT_SPI SPI 220 #define RADIOLIB_PROGMEM PROGMEM 221 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 223 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) 225 #define RADIOLIB_PLATFORM "Arduino megaAVR" 226 #define RADIOLIB_PIN_TYPE uint8_t 227 #define RADIOLIB_PIN_MODE PinMode 228 #define RADIOLIB_PIN_STATUS PinStatus 229 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 230 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 231 #define RADIOLIB_NC (0xFF) 232 #define RADIOLIB_DEFAULT_SPI SPI 233 #define RADIOLIB_PROGMEM PROGMEM 234 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 236 #elif defined(AM_PART_APOLLO3) 238 #define RADIOLIB_PLATFORM "Sparkfun Artemis" 239 #define RADIOLIB_PIN_TYPE uint8_t 240 #define RADIOLIB_PIN_MODE uint8_t 241 #define RADIOLIB_PIN_STATUS uint8_t 242 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 243 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 244 #define RADIOLIB_NC (0xFF) 245 #define RADIOLIB_DEFAULT_SPI SPI 246 #define RADIOLIB_PROGMEM PROGMEM 247 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 248 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 249 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 251 #elif defined(ARDUINO_ARDUINO_NANO33BLE) 253 #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE" 254 #define RADIOLIB_PIN_TYPE pin_size_t 255 #define RADIOLIB_PIN_MODE PinMode 256 #define RADIOLIB_PIN_STATUS PinStatus 257 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 258 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 259 #define RADIOLIB_NC (0xFF) 260 #define RADIOLIB_DEFAULT_SPI SPI 261 #define RADIOLIB_PROGMEM PROGMEM 262 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 263 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 264 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 267 #define RADIOLIB_EXCLUDE_ESP8266 269 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) 271 #define RADIOLIB_PLATFORM "Portenta H7" 272 #define RADIOLIB_PIN_TYPE pin_size_t 273 #define RADIOLIB_PIN_MODE PinMode 274 #define RADIOLIB_PIN_STATUS PinStatus 275 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 276 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 277 #define RADIOLIB_NC (0xFF) 278 #define RADIOLIB_DEFAULT_SPI SPI 279 #define RADIOLIB_PROGMEM PROGMEM 280 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 281 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 282 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 285 #define RADIOLIB_EXCLUDE_ESP8266 287 #elif defined(__STM32F4__) || defined(__STM32F1__) 289 #define RADIOLIB_PLATFORM "STM32duino (unofficial)" 290 #define RADIOLIB_PIN_TYPE uint8_t 291 #define RADIOLIB_PIN_MODE WiringPinMode 292 #define RADIOLIB_PIN_STATUS uint8_t 293 #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode 294 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 295 #define RADIOLIB_NC (0xFF) 296 #define RADIOLIB_DEFAULT_SPI SPI 297 #define RADIOLIB_PROGMEM PROGMEM 298 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 299 #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 300 #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 302 #elif defined(ARDUINO_ARCH_MEGAAVR) 304 #define RADIOLIB_PLATFORM "MegaCoreX" 305 #define RADIOLIB_PIN_TYPE uint8_t 306 #define RADIOLIB_PIN_MODE uint8_t 307 #define RADIOLIB_PIN_STATUS uint8_t 308 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 309 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 310 #define RADIOLIB_NC (0xFF) 311 #define RADIOLIB_DEFAULT_SPI SPI 312 #define RADIOLIB_PROGMEM PROGMEM 313 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 317 #define RADIOLIB_PLATFORM "Unknown" 318 #define RADIOLIB_UNKNOWN_PLATFORM 319 #define RADIOLIB_PIN_TYPE uint8_t 320 #define RADIOLIB_PIN_MODE uint8_t 321 #define RADIOLIB_PIN_STATUS uint8_t 322 #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS 323 #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p) 324 #define RADIOLIB_NC (0xFF) 325 #define RADIOLIB_DEFAULT_SPI SPI 326 #define RADIOLIB_PROGMEM PROGMEM 327 #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr) 344 #define RADIOLIB_DEBUG_PORT Serial 346 #if defined(RADIOLIB_DEBUG) 347 #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); } 348 #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); } 350 #define RADIOLIB_DEBUG_PRINT(...) {} 351 #define RADIOLIB_DEBUG_PRINTLN(...) {} 354 #if defined(RADIOLIB_VERBOSE) 355 #define RADIOLIB_VERBOSE_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); } 356 #define RADIOLIB_VERBOSE_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); } 358 #define RADIOLIB_VERBOSE_PRINT(...) {} 359 #define RADIOLIB_VERBOSE_PRINTLN(...) {} 382 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE) 383 #define RADIOLIB_STATIC_ARRAY_SIZE 256 389 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != ERR_NONE) { return(STATEVAR); } } 394 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } } 398 #define RADIOLIB_VERSION_MAJOR (0x04) 399 #define RADIOLIB_VERSION_MINOR (0x01) 400 #define RADIOLIB_VERSION_PATCH (0x00) 401 #define RADIOLIB_VERSION_EXTRA (0x00) 403 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))