From b376fb02c06ec6c2fb0f097e1cb17d68ebac891e Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 27 Oct 2021 22:12:07 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=2098e2a?= =?UTF-8?q?1847d88b7d0addc7227f6f18c43131163e5=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _build_opt_8h_source.html | 547 +++++++++++++++++++------------------- 1 file changed, 274 insertions(+), 273 deletions(-) diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index 381d1ae2..5ff0341f 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -329,279 +329,280 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
241  #define RADIOLIB_DEFAULT_SPI SPI
242  #define RADIOLIB_PROGMEM PROGMEM
243  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
244 
-
245  #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY)
-
246  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
-
247  #define RADIOLIB_PLATFORM "Arduino megaAVR"
-
248  #define RADIOLIB_PIN_TYPE uint8_t
-
249  #define RADIOLIB_PIN_MODE PinMode
-
250  #define RADIOLIB_PIN_STATUS PinStatus
-
251  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
252  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
253  #define RADIOLIB_NC (0xFF)
-
254  #define RADIOLIB_DEFAULT_SPI SPI
-
255  #define RADIOLIB_PROGMEM PROGMEM
-
256  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
257  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
258 
-
259  #elif defined(ARDUINO_ARCH_APOLLO3)
-
260  // Sparkfun Apollo3 boards
-
261  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
-
262  #define RADIOLIB_PIN_TYPE pin_size_t
-
263  #define RADIOLIB_PIN_MODE Arduino_PinMode
-
264  #define RADIOLIB_PIN_STATUS PinStatus
-
265  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
266  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
267  #define RADIOLIB_NC (0xFF)
-
268  #define RADIOLIB_DEFAULT_SPI SPI
-
269  #define RADIOLIB_PROGMEM PROGMEM
-
270  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
271  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
272  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
-
273  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
-
274 
-
275  // Apollo3 uses mbed libraries, which already contain ESP8266 driver
-
276  #define RADIOLIB_EXCLUDE_ESP8266
-
277 
-
278  // slow down SX126x/8x SPI on this platform
-
279  #define RADIOLIB_SPI_SLOWDOWN
-
280 
-
281  #elif defined(ARDUINO_ARDUINO_NANO33BLE)
-
282  // Arduino Nano 33 BLE
-
283  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
-
284  #define RADIOLIB_PIN_TYPE pin_size_t
-
285  #define RADIOLIB_PIN_MODE PinMode
-
286  #define RADIOLIB_PIN_STATUS PinStatus
-
287  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
288  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
289  #define RADIOLIB_NC (0xFF)
-
290  #define RADIOLIB_DEFAULT_SPI SPI
-
291  #define RADIOLIB_PROGMEM PROGMEM
-
292  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
293  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
294  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
-
295  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
-
296 
-
297  // Nano 33 BLE uses mbed libraries, which already contain ESP8266 driver
-
298  #define RADIOLIB_EXCLUDE_ESP8266
-
299 
-
300  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
-
301  // Arduino Portenta H7
-
302  #define RADIOLIB_PLATFORM "Portenta H7"
-
303  #define RADIOLIB_PIN_TYPE pin_size_t
-
304  #define RADIOLIB_PIN_MODE PinMode
-
305  #define RADIOLIB_PIN_STATUS PinStatus
-
306  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
307  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
308  #define RADIOLIB_NC (0xFF)
-
309  #define RADIOLIB_DEFAULT_SPI SPI
-
310  #define RADIOLIB_PROGMEM PROGMEM
-
311  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
312  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
313  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
-
314  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
-
315 
-
316  // Arduino Portenta H7 uses mbed libraries, which already contain ESP8266 driver
-
317  #define RADIOLIB_EXCLUDE_ESP8266
-
318 
-
319  #elif defined(__STM32F4__) || defined(__STM32F1__)
-
320  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
-
321  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
-
322  #define RADIOLIB_PIN_TYPE uint8_t
-
323  #define RADIOLIB_PIN_MODE WiringPinMode
-
324  #define RADIOLIB_PIN_STATUS uint8_t
-
325  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
-
326  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
327  #define RADIOLIB_NC (0xFF)
-
328  #define RADIOLIB_DEFAULT_SPI SPI
-
329  #define RADIOLIB_PROGMEM PROGMEM
-
330  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
331  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
332  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
-
333  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
-
334 
-
335  #elif defined(ARDUINO_ARCH_MEGAAVR)
-
336  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
-
337  #define RADIOLIB_PLATFORM "MegaCoreX"
-
338  #define RADIOLIB_PIN_TYPE uint8_t
-
339  #define RADIOLIB_PIN_MODE uint8_t
-
340  #define RADIOLIB_PIN_STATUS uint8_t
-
341  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
342  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
343  #define RADIOLIB_NC (0xFF)
-
344  #define RADIOLIB_DEFAULT_SPI SPI
-
345  #define RADIOLIB_PROGMEM PROGMEM
-
346  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
347  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
348 
-
349  #elif defined(ARDUINO_ARCH_RP2040)
-
350  // Raspberry Pi Pico
-
351  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
-
352  #define RADIOLIB_PIN_TYPE pin_size_t
-
353  #define RADIOLIB_PIN_MODE PinMode
-
354  #define RADIOLIB_PIN_STATUS PinStatus
-
355  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
356  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
357  #define RADIOLIB_NC (0xFF)
-
358  #define RADIOLIB_DEFAULT_SPI SPI
-
359  #define RADIOLIB_PROGMEM PROGMEM
-
360  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
361  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
362  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
-
363  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
-
364  #define RADIOLIB_EXCLUDE_ESP8266
-
365 
-
366  #elif defined(__ASR6501__)
-
367  // CubeCell
-
368  #define RADIOLIB_PLATFORM "CubeCell"
-
369  #define RADIOLIB_PIN_TYPE uint8_t
-
370  #define RADIOLIB_PIN_MODE PINMODE
-
371  #define RADIOLIB_PIN_STATUS uint8_t
-
372  #define RADIOLIB_INTERRUPT_STATUS IrqModes
-
373  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
374  #define RADIOLIB_NC (0xFF)
-
375  #define RADIOLIB_DEFAULT_SPI SPI
-
376  #define RADIOLIB_PROGMEM PROGMEM
-
377  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
378 
-
379  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
380  #define nullptr NULL
-
381 
-
382  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
383  #undef pinMode
-
384 
-
385  // ... and uses an outdated GCC which does not support type aliases
-
386  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
-
387 
-
388  // ... and it also has no tone(). This platform was designed by an idiot.
-
389  #define RADIOLIB_TONE_UNSUPPORTED
-
390 
-
391  #else
-
392  // other platforms not covered by the above list - this may or may not work
-
393  #define RADIOLIB_PLATFORM "Unknown"
-
394  #define RADIOLIB_UNKNOWN_PLATFORM
-
395  #define RADIOLIB_PIN_TYPE uint8_t
-
396  #define RADIOLIB_PIN_MODE uint8_t
-
397  #define RADIOLIB_PIN_STATUS uint8_t
-
398  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
399  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
400  #define RADIOLIB_NC (0xFF)
-
401  #define RADIOLIB_DEFAULT_SPI SPI
-
402  #define RADIOLIB_PROGMEM PROGMEM
-
403  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
-
404  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
405 
-
406  #endif
-
407 #endif
-
408 
-
409 /*
-
410  * Uncomment to enable debug output.
-
411  * Warning: Debug output will slow down the whole system significantly.
-
412  * Also, it will result in larger compiled binary.
-
413  * Levels: debug - only main info
-
414  * verbose - full transcript of all SPI/UART communication
-
415  */
-
416 
-
417 //#define RADIOLIB_DEBUG
-
418 //#define RADIOLIB_VERBOSE
-
419 
-
420 // set which Serial port should be used for debug output
-
421 #define RADIOLIB_DEBUG_PORT Serial
-
422 
-
423 #if defined(RADIOLIB_DEBUG)
-
424  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
-
425  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
-
426 #else
-
427  #define RADIOLIB_DEBUG_PRINT(...) {}
-
428  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
429 #endif
-
430 
-
431 #if defined(RADIOLIB_VERBOSE)
-
432  #define RADIOLIB_VERBOSE_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
-
433  #define RADIOLIB_VERBOSE_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
-
434 #else
-
435  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
436  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
437 #endif
-
438 
-
439 /*
-
440  * Uncomment to enable "paranoid" SPI mode
-
441  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
-
442  * This improves reliablility, but slightly slows down communication.
-
443  * Note: Enabled by default.
-
444  */
-
445 #define RADIOLIB_SPI_PARANOID
-
446 
-
447 /*
-
448  * Uncomment to enable parameter range checking
-
449  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
-
450  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
-
451  * possibly leading to bricked module and/or program crashing.
-
452  * Note: Enabled by default.
-
453  */
-
454 #define RADIOLIB_CHECK_PARAMS
-
455 
-
456 /*
-
457  * Uncomment to enable SX127x errata fix
-
458  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
-
459  * It should only be enabled if you really are observing some errata-related issue.
-
460  * Note: Disabled by default.
-
461  */
-
462 //#define RADIOLIB_FIX_ERRATA_SX127X
-
463 
-
464 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
-
465  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
466 #else
-
467  #define RADIOLIB_ERRATA_SX127X(...) {}
-
468 #endif
-
469 
-
470 /*
-
471  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
-
472  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
-
473  * Failure to heed the above warning may result in bricked module.
-
474  */
-
475 //#define RADIOLIB_GODMODE
-
476 
-
477 /*
-
478  * Uncomment to enable low-level hardware access
-
479  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
-
480  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
-
481  */
-
482 //#define RADIOLIB_LOW_LEVEL
-
483 
-
484 /*
-
485  * Uncomment to enable pre-defined modules when using RadioShield.
-
486  */
-
487 //#define RADIOLIB_RADIOSHIELD
-
488 
-
489 /*
-
490  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
-
491  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
492  */
-
493 //#define RADIOLIB_STATIC_ONLY
-
494 
-
495 // set the size of static arrays to use
-
496 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
497 #define RADIOLIB_STATIC_ARRAY_SIZE 256
-
498 #endif
-
499 
-
503 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != ERR_NONE) { return(STATEVAR); } }
-
504 
-
508 #if defined(RADIOLIB_CHECK_PARAMS)
-
509 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
510 #else
-
511 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
512 #endif
-
513 
-
514 // version definitions
-
515 #define RADIOLIB_VERSION_MAJOR (0x04)
-
516 #define RADIOLIB_VERSION_MINOR (0x06)
-
517 #define RADIOLIB_VERSION_PATCH (0x00)
-
518 #define RADIOLIB_VERSION_EXTRA (0x00)
-
519 
-
520 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
-
521 
-
522 #endif
+
244  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
245 
+
246  #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY)
+
247  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
+
248  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
249  #define RADIOLIB_PIN_TYPE uint8_t
+
250  #define RADIOLIB_PIN_MODE PinMode
+
251  #define RADIOLIB_PIN_STATUS PinStatus
+
252  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
253  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
254  #define RADIOLIB_NC (0xFF)
+
255  #define RADIOLIB_DEFAULT_SPI SPI
+
256  #define RADIOLIB_PROGMEM PROGMEM
+
257  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
258  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
259 
+
260  #elif defined(ARDUINO_ARCH_APOLLO3)
+
261  // Sparkfun Apollo3 boards
+
262  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
263  #define RADIOLIB_PIN_TYPE pin_size_t
+
264  #define RADIOLIB_PIN_MODE Arduino_PinMode
+
265  #define RADIOLIB_PIN_STATUS PinStatus
+
266  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
267  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
268  #define RADIOLIB_NC (0xFF)
+
269  #define RADIOLIB_DEFAULT_SPI SPI
+
270  #define RADIOLIB_PROGMEM PROGMEM
+
271  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
272  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
273  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
274  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
275 
+
276  // Apollo3 uses mbed libraries, which already contain ESP8266 driver
+
277  #define RADIOLIB_EXCLUDE_ESP8266
+
278 
+
279  // slow down SX126x/8x SPI on this platform
+
280  #define RADIOLIB_SPI_SLOWDOWN
+
281 
+
282  #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
283  // Arduino Nano 33 BLE
+
284  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
285  #define RADIOLIB_PIN_TYPE pin_size_t
+
286  #define RADIOLIB_PIN_MODE PinMode
+
287  #define RADIOLIB_PIN_STATUS PinStatus
+
288  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
289  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
290  #define RADIOLIB_NC (0xFF)
+
291  #define RADIOLIB_DEFAULT_SPI SPI
+
292  #define RADIOLIB_PROGMEM PROGMEM
+
293  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
294  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
295  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
296  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
297 
+
298  // Nano 33 BLE uses mbed libraries, which already contain ESP8266 driver
+
299  #define RADIOLIB_EXCLUDE_ESP8266
+
300 
+
301  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
302  // Arduino Portenta H7
+
303  #define RADIOLIB_PLATFORM "Portenta H7"
+
304  #define RADIOLIB_PIN_TYPE pin_size_t
+
305  #define RADIOLIB_PIN_MODE PinMode
+
306  #define RADIOLIB_PIN_STATUS PinStatus
+
307  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
308  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
309  #define RADIOLIB_NC (0xFF)
+
310  #define RADIOLIB_DEFAULT_SPI SPI
+
311  #define RADIOLIB_PROGMEM PROGMEM
+
312  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
313  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
314  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
315  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
316 
+
317  // Arduino Portenta H7 uses mbed libraries, which already contain ESP8266 driver
+
318  #define RADIOLIB_EXCLUDE_ESP8266
+
319 
+
320  #elif defined(__STM32F4__) || defined(__STM32F1__)
+
321  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
322  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
323  #define RADIOLIB_PIN_TYPE uint8_t
+
324  #define RADIOLIB_PIN_MODE WiringPinMode
+
325  #define RADIOLIB_PIN_STATUS uint8_t
+
326  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
+
327  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
328  #define RADIOLIB_NC (0xFF)
+
329  #define RADIOLIB_DEFAULT_SPI SPI
+
330  #define RADIOLIB_PROGMEM PROGMEM
+
331  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
332  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
333  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
334  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
335 
+
336  #elif defined(ARDUINO_ARCH_MEGAAVR)
+
337  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
338  #define RADIOLIB_PLATFORM "MegaCoreX"
+
339  #define RADIOLIB_PIN_TYPE uint8_t
+
340  #define RADIOLIB_PIN_MODE uint8_t
+
341  #define RADIOLIB_PIN_STATUS uint8_t
+
342  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
343  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
344  #define RADIOLIB_NC (0xFF)
+
345  #define RADIOLIB_DEFAULT_SPI SPI
+
346  #define RADIOLIB_PROGMEM PROGMEM
+
347  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
348  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
349 
+
350  #elif defined(ARDUINO_ARCH_RP2040)
+
351  // Raspberry Pi Pico
+
352  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
353  #define RADIOLIB_PIN_TYPE pin_size_t
+
354  #define RADIOLIB_PIN_MODE PinMode
+
355  #define RADIOLIB_PIN_STATUS PinStatus
+
356  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
357  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
358  #define RADIOLIB_NC (0xFF)
+
359  #define RADIOLIB_DEFAULT_SPI SPI
+
360  #define RADIOLIB_PROGMEM PROGMEM
+
361  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
362  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
363  #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
+
364  #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
+
365  #define RADIOLIB_EXCLUDE_ESP8266
+
366 
+
367  #elif defined(__ASR6501__)
+
368  // CubeCell
+
369  #define RADIOLIB_PLATFORM "CubeCell"
+
370  #define RADIOLIB_PIN_TYPE uint8_t
+
371  #define RADIOLIB_PIN_MODE PINMODE
+
372  #define RADIOLIB_PIN_STATUS uint8_t
+
373  #define RADIOLIB_INTERRUPT_STATUS IrqModes
+
374  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
375  #define RADIOLIB_NC (0xFF)
+
376  #define RADIOLIB_DEFAULT_SPI SPI
+
377  #define RADIOLIB_PROGMEM PROGMEM
+
378  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
379 
+
380  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
381  #define nullptr NULL
+
382 
+
383  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
384  #undef pinMode
+
385 
+
386  // ... and uses an outdated GCC which does not support type aliases
+
387  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
388 
+
389  // ... and it also has no tone(). This platform was designed by an idiot.
+
390  #define RADIOLIB_TONE_UNSUPPORTED
+
391 
+
392  #else
+
393  // other platforms not covered by the above list - this may or may not work
+
394  #define RADIOLIB_PLATFORM "Unknown"
+
395  #define RADIOLIB_UNKNOWN_PLATFORM
+
396  #define RADIOLIB_PIN_TYPE uint8_t
+
397  #define RADIOLIB_PIN_MODE uint8_t
+
398  #define RADIOLIB_PIN_STATUS uint8_t
+
399  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
400  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
401  #define RADIOLIB_NC (0xFF)
+
402  #define RADIOLIB_DEFAULT_SPI SPI
+
403  #define RADIOLIB_PROGMEM PROGMEM
+
404  #define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
+
405  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
406 
+
407  #endif
+
408 #endif
+
409 
+
410 /*
+
411  * Uncomment to enable debug output.
+
412  * Warning: Debug output will slow down the whole system significantly.
+
413  * Also, it will result in larger compiled binary.
+
414  * Levels: debug - only main info
+
415  * verbose - full transcript of all SPI/UART communication
+
416  */
+
417 
+
418 //#define RADIOLIB_DEBUG
+
419 //#define RADIOLIB_VERBOSE
+
420 
+
421 // set which Serial port should be used for debug output
+
422 #define RADIOLIB_DEBUG_PORT Serial
+
423 
+
424 #if defined(RADIOLIB_DEBUG)
+
425  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
+
426  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
+
427 #else
+
428  #define RADIOLIB_DEBUG_PRINT(...) {}
+
429  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
430 #endif
+
431 
+
432 #if defined(RADIOLIB_VERBOSE)
+
433  #define RADIOLIB_VERBOSE_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
+
434  #define RADIOLIB_VERBOSE_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
+
435 #else
+
436  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
437  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
438 #endif
+
439 
+
440 /*
+
441  * Uncomment to enable "paranoid" SPI mode
+
442  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
443  * This improves reliablility, but slightly slows down communication.
+
444  * Note: Enabled by default.
+
445  */
+
446 #define RADIOLIB_SPI_PARANOID
+
447 
+
448 /*
+
449  * Uncomment to enable parameter range checking
+
450  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
451  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
452  * possibly leading to bricked module and/or program crashing.
+
453  * Note: Enabled by default.
+
454  */
+
455 #define RADIOLIB_CHECK_PARAMS
+
456 
+
457 /*
+
458  * Uncomment to enable SX127x errata fix
+
459  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
+
460  * It should only be enabled if you really are observing some errata-related issue.
+
461  * Note: Disabled by default.
+
462  */
+
463 //#define RADIOLIB_FIX_ERRATA_SX127X
+
464 
+
465 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
+
466  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
467 #else
+
468  #define RADIOLIB_ERRATA_SX127X(...) {}
+
469 #endif
+
470 
+
471 /*
+
472  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
473  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
474  * Failure to heed the above warning may result in bricked module.
+
475  */
+
476 //#define RADIOLIB_GODMODE
+
477 
+
478 /*
+
479  * Uncomment to enable low-level hardware access
+
480  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
+
481  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
482  */
+
483 //#define RADIOLIB_LOW_LEVEL
+
484 
+
485 /*
+
486  * Uncomment to enable pre-defined modules when using RadioShield.
+
487  */
+
488 //#define RADIOLIB_RADIOSHIELD
+
489 
+
490 /*
+
491  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
+
492  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
493  */
+
494 //#define RADIOLIB_STATIC_ONLY
+
495 
+
496 // set the size of static arrays to use
+
497 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
498 #define RADIOLIB_STATIC_ARRAY_SIZE 256
+
499 #endif
+
500 
+
504 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != ERR_NONE) { return(STATEVAR); } }
+
505 
+
509 #if defined(RADIOLIB_CHECK_PARAMS)
+
510 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
511 #else
+
512 #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
513 #endif
+
514 
+
515 // version definitions
+
516 #define RADIOLIB_VERSION_MAJOR (0x04)
+
517 #define RADIOLIB_VERSION_MINOR (0x06)
+
518 #define RADIOLIB_VERSION_PATCH (0x00)
+
519 #define RADIOLIB_VERSION_EXTRA (0x00)
+
520 
+
521 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+
522 
+
523 #endif