From 1630d5d1ee3c402b55efc9f52342debe29774b1e Mon Sep 17 00:00:00 2001 From: jgromes Date: Fri, 13 Sep 2024 15:42:24 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20d371b?= =?UTF-8?q?50c5af1ff945d4033eec8778a437f4a41c2=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 | 651 +++++++++++++++++++------------------- 1 file changed, 327 insertions(+), 324 deletions(-) diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index 1c61abf2..d99d0ecc 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -340,337 +340,340 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
252 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
253  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
254  #define RADIOLIB_PLATFORM "Arduino megaAVR"
-
255 
-
256 #elif defined(ARDUINO_ARCH_APOLLO3)
-
257  // Sparkfun Apollo3 boards
-
258  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
-
259  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
-
260  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
261  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
262 
-
263 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
-
264  // Arduino Nano 33 BLE
-
265  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
-
266  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
267  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
268  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
269 
-
270  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
271  #define RADIOLIB_TONE_UNSUPPORTED
-
272  #define RADIOLIB_MBED_TONE_OVERRIDE
-
273 
-
274 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
-
275  // Arduino Portenta H7
-
276  #define RADIOLIB_PLATFORM "Portenta H7"
-
277  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
278  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
279  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
280 
-
281  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
282  #define RADIOLIB_TONE_UNSUPPORTED
-
283  #define RADIOLIB_MBED_TONE_OVERRIDE
-
284 
-
285 #elif defined(__STM32F4__) || defined(__STM32F1__)
-
286  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
-
287  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
-
288  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
-
289  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
-
290 
-
291 #elif defined(ARDUINO_ARCH_MEGAAVR)
-
292  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
-
293  #define RADIOLIB_PLATFORM "MegaCoreX"
-
294 
-
295 #elif defined(ARDUINO_ARCH_MBED_RP2040)
-
296  // Raspberry Pi Pico (official mbed core)
-
297  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
-
298  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
299  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
300  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
301 
-
302  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
303  #define RADIOLIB_TONE_UNSUPPORTED
-
304  #define RADIOLIB_MBED_TONE_OVERRIDE
-
305 
-
306 #elif defined(ARDUINO_ARCH_RP2040)
-
307  // Raspberry Pi Pico (unofficial core)
-
308  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
-
309  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
310  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
311  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
312 
-
313 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
-
314  // CubeCell
-
315  #define RADIOLIB_PLATFORM "CubeCell"
-
316  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
-
317  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
-
318  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
-
319 
-
320  // provide an easy access to the on-board module
-
321  #include "board-config.h"
-
322  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
-
323 
-
324  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
325  #define nullptr NULL
+
255  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
256  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
257  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
258 
+
259 #elif defined(ARDUINO_ARCH_APOLLO3)
+
260  // Sparkfun Apollo3 boards
+
261  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
262  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
+
263  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
264  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
265 
+
266 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
267  // Arduino Nano 33 BLE
+
268  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
269  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
270  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
271  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
272 
+
273  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
274  #define RADIOLIB_TONE_UNSUPPORTED
+
275  #define RADIOLIB_MBED_TONE_OVERRIDE
+
276 
+
277 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
278  // Arduino Portenta H7
+
279  #define RADIOLIB_PLATFORM "Portenta H7"
+
280  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
281  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
282  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
283 
+
284  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
285  #define RADIOLIB_TONE_UNSUPPORTED
+
286  #define RADIOLIB_MBED_TONE_OVERRIDE
+
287 
+
288 #elif defined(__STM32F4__) || defined(__STM32F1__)
+
289  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
290  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
291  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
+
292  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
+
293 
+
294 #elif defined(ARDUINO_ARCH_MEGAAVR)
+
295  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
296  #define RADIOLIB_PLATFORM "MegaCoreX"
+
297 
+
298 #elif defined(ARDUINO_ARCH_MBED_RP2040)
+
299  // Raspberry Pi Pico (official mbed core)
+
300  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
301  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
302  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
303  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
304 
+
305  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
306  #define RADIOLIB_TONE_UNSUPPORTED
+
307  #define RADIOLIB_MBED_TONE_OVERRIDE
+
308 
+
309 #elif defined(ARDUINO_ARCH_RP2040)
+
310  // Raspberry Pi Pico (unofficial core)
+
311  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
+
312  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
313  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
314  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
315 
+
316 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
+
317  // CubeCell
+
318  #define RADIOLIB_PLATFORM "CubeCell"
+
319  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
+
320  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
+
321  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
+
322 
+
323  // provide an easy access to the on-board module
+
324  #include "board-config.h"
+
325  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
326 
-
327  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
328  #undef pinMode
+
327  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
328  #define nullptr NULL
329 
-
330  // ... and uses an outdated GCC which does not support type aliases
-
331  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
330  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
331  #undef pinMode
332 
-
333  // ... and it also has no tone(). This platform was designed by an idiot.
-
334  #define RADIOLIB_TONE_UNSUPPORTED
+
333  // ... and uses an outdated GCC which does not support type aliases
+
334  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
335 
-
336  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
-
337  #define RADIOLIB_YIELD_UNSUPPORTED
-
338  #if defined(yield)
-
339  #undef yield
-
340  #endif
-
341 
-
342 #elif defined(RASPI)
-
343  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
-
344  #define RADIOLIB_PLATFORM "RasPiArduino"
-
345 
-
346  // let's start off easy - no tone on this platform, that can happen
-
347  #define RADIOLIB_TONE_UNSUPPORTED
+
336  // ... and it also has no tone(). This platform was designed by an idiot.
+
337  #define RADIOLIB_TONE_UNSUPPORTED
+
338 
+
339  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
+
340  #define RADIOLIB_YIELD_UNSUPPORTED
+
341  #if defined(yield)
+
342  #undef yield
+
343  #endif
+
344 
+
345 #elif defined(RASPI)
+
346  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
+
347  #define RADIOLIB_PLATFORM "RasPiArduino"
348 
-
349  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
-
350  #define RADIOLIB_YIELD_UNSUPPORTED
+
349  // let's start off easy - no tone on this platform, that can happen
+
350  #define RADIOLIB_TONE_UNSUPPORTED
351 
-
352  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
-
353  #define PGM_P const char *
+
352  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
+
353  #define RADIOLIB_YIELD_UNSUPPORTED
354 
-
355  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
-
356  #if defined(millis)
-
357  #undef millis
-
358  inline RadioLibTime_t millis() { return((RadioLibTime_t)(STCV / 1000)); };
-
359  #endif
-
360 
-
361  #if defined(micros)
-
362  #undef micros
-
363  inline RadioLibTime_t micros() { return((RadioLibTime_t)(STCV)); };
-
364  #endif
-
365 
-
366 #elif defined(TEENSYDUINO)
-
367  // Teensy
-
368  #define RADIOLIB_PLATFORM "Teensy"
-
369 
-
370 #elif defined(ARDUINO_ARCH_RENESAS)
-
371  // Arduino Renesas (UNO R4)
-
372  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
-
373  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
374  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
375  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
376 
-
377 #else
-
378  // other Arduino platforms not covered by the above list - this may or may not work
-
379  #define RADIOLIB_PLATFORM "Unknown Arduino"
-
380  #define RADIOLIB_UNKNOWN_PLATFORM
-
381 
-
382 #endif
-
383 
-
384  // set the default values for all macros
-
385  // these will be applied if they were not defined above
-
386  #if !defined(RADIOLIB_NC)
-
387  #define RADIOLIB_NC (0xFFFFFFFF)
-
388  #endif
-
389 
-
390  #if !defined(RADIOLIB_DEFAULT_SPI)
-
391  #define RADIOLIB_DEFAULT_SPI SPI
-
392  #endif
-
393 
-
394  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
-
395  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
396  #endif
-
397 
-
398  #if !defined(RADIOLIB_NONVOLATILE)
-
399  #define RADIOLIB_NONVOLATILE PROGMEM
-
400  #endif
-
401 
-
402  #if !defined(RADIOLIB_NONVOLATILE_PTR)
-
403  #define RADIOLIB_NONVOLATILE_PTR PGM_P
-
404  #endif
-
405 
-
406  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
-
407  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
408  #endif
-
409 
-
410  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
-
411  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
-
412  #endif
-
413 
-
414  #if !defined(RADIOLIB_TYPE_ALIAS)
-
415  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
416  #endif
-
417 
-
418  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
-
419  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
-
420  #endif
-
421 
-
422  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
-
423  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
-
424  #endif
-
425 
-
426  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
-
427  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
-
428  #endif
-
429 
-
430 #else
-
431  // generic non-Arduino platform
-
432  #define RADIOLIB_PLATFORM "Generic"
-
433 
-
434  #define RADIOLIB_NC (0xFF)
-
435  #define RADIOLIB_NONVOLATILE
-
436  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
-
437  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
-
438  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
439 
-
440  #if !defined(RADIOLIB_DEBUG_PORT)
-
441  #define RADIOLIB_DEBUG_PORT stdout
-
442  #endif
-
443 
-
444  #define DEC 10
-
445  #define HEX 16
-
446  #define OCT 8
-
447  #define BIN 2
-
448 
-
449  #include <stdint.h>
-
450 
-
451 #endif
-
452 
-
453 // This only compiles on STM32 boards with SUBGHZ module, but also
-
454 // include when generating docs
-
455 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
-
456  #define RADIOLIB_EXCLUDE_STM32WLX (1)
-
457 #endif
-
458 
-
459 // if verbose assert is enabled, enable basic debug too
-
460 #if RADIOLIB_VERBOSE_ASSERT
-
461  #define RADIOLIB_DEBUG (1)
-
462 #endif
-
463 
-
464 // set the global debug mode flag
-
465 #if RADIOLIB_DEBUG_BASIC || RADIOLIB_DEBUG_PROTOCOL || RADIOLIB_DEBUG_SPI
-
466  #define RADIOLIB_DEBUG (1)
-
467 #else
-
468  #define RADIOLIB_DEBUG (0)
-
469 #endif
-
470 
-
471 #if RADIOLIB_DEBUG
-
472  #if defined(RADIOLIB_BUILD_ARDUINO)
-
473  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
-
474  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
-
475  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M, ##__VA_ARGS__)
-
476  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M "\n", ##__VA_ARGS__)
-
477 
-
478  // some platforms do not support printf("%f"), so it has to be done this way
-
479  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL); RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
-
480  #else
-
481  #if !defined(RADIOLIB_DEBUG_PRINT)
-
482  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
-
483  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M, ##__VA_ARGS__)
-
484  #endif
-
485  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
486  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
-
487  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M "\n", ##__VA_ARGS__)
-
488  #endif
-
489  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL "%.3f", VAL)
-
490  #endif
-
491 
-
492  #define RADIOLIB_DEBUG_HEXDUMP(LEVEL, ...) Module::hexdump(LEVEL, __VA_ARGS__)
-
493 #else
-
494  #define RADIOLIB_DEBUG_PRINT(...) {}
-
495  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
496  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
-
497  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
-
498 #endif
-
499 
-
500 #if RADIOLIB_DEBUG_BASIC
-
501  #define RADIOLIB_DEBUG_BASIC_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_DBG: ", __VA_ARGS__)
-
502  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
-
503  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_DBG: ", __VA_ARGS__)
-
504  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_DBG: ", __VA_ARGS__);
-
505  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_DBG: ", __VA_ARGS__);
-
506 #else
-
507  #define RADIOLIB_DEBUG_BASIC_PRINT(...) {}
-
508  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) {}
-
509  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) {}
-
510  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) {}
-
511  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) {}
-
512 #endif
-
513 
-
514 #if RADIOLIB_DEBUG_PROTOCOL
-
515  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_PRO: ", __VA_ARGS__)
-
516  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_PRO: ", __VA_ARGS__)
-
517  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_PRO: ", __VA_ARGS__);
-
518  #define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_PRO: ", __VA_ARGS__);
-
519 #else
-
520  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) {}
-
521  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) {}
-
522  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) {}
-
523  #define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) {}
-
524 #endif
-
525 
-
526 #if RADIOLIB_DEBUG_SPI
-
527  #define RADIOLIB_DEBUG_SPI_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_SPI: ", __VA_ARGS__)
-
528  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
-
529  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_SPI: ", __VA_ARGS__)
-
530  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) RADIOLIB_DEBUG_PRINTLN_LVL("", __VA_ARGS__)
-
531  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_SPI: ", __VA_ARGS__);
-
532  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_SPI: ", __VA_ARGS__);
-
533 #else
-
534  #define RADIOLIB_DEBUG_SPI_PRINT(...) {}
-
535  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) {}
-
536  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) {}
-
537  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) {}
-
538  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) {}
-
539  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) {}
-
540 #endif
-
541 
-
542 // debug info strings
-
543 #define RADIOLIB_VALUE_TO_STRING(x) #x
-
544 #define RADIOLIB_VALUE(x) RADIOLIB_VALUE_TO_STRING(x)
-
545 
-
546 #define RADIOLIB_INFO "\nRadioLib Info\nVersion: \"" \
-
547  RADIOLIB_VALUE(RADIOLIB_VERSION_MAJOR) "." \
-
548  RADIOLIB_VALUE(RADIOLIB_VERSION_MINOR) "." \
-
549  RADIOLIB_VALUE(RADIOLIB_VERSION_PATCH) "." \
-
550  RADIOLIB_VALUE(RADIOLIB_VERSION_EXTRA) "\"\n" \
-
551  "Platform: " RADIOLIB_VALUE(RADIOLIB_PLATFORM) "\n" \
-
552  "Compiled: " RADIOLIB_VALUE(__DATE__) " " RADIOLIB_VALUE(__TIME__)
-
553 
-
559 #if RADIOLIB_VERBOSE_ASSERT
-
560 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { RADIOLIB_DEBUG_BASIC_PRINTLN("%d at %s:%d", STATEVAR, __FILE__, __LINE__); return(STATEVAR); } }
-
561 #else
-
562 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
-
563 #endif
-
564 
-
568 #if RADIOLIB_CHECK_PARAMS
-
569  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
570 #else
-
571  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
572 #endif
-
573 
-
574 #if RADIOLIB_FIX_ERRATA_SX127X
-
575  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
576 #else
-
577  #define RADIOLIB_ERRATA_SX127X(...) {}
-
578 #endif
-
579 
-
580 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
-
581 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
-
582 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
-
583 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
-
584 
-
585 // version definitions
-
586 #define RADIOLIB_VERSION_MAJOR 6
-
587 #define RADIOLIB_VERSION_MINOR 6
-
588 #define RADIOLIB_VERSION_PATCH 0
-
589 #define RADIOLIB_VERSION_EXTRA 0
-
590 
-
591 #define RADIOLIB_VERSION (((RADIOLIB_VERSION_MAJOR) << 24) | ((RADIOLIB_VERSION_MINOR) << 16) | ((RADIOLIB_VERSION_PATCH) << 8) | (RADIOLIB_VERSION_EXTRA))
-
592 
-
593 #endif
+
355  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
+
356  #define PGM_P const char *
+
357 
+
358  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
+
359  #if defined(millis)
+
360  #undef millis
+
361  inline RadioLibTime_t millis() { return((RadioLibTime_t)(STCV / 1000)); };
+
362  #endif
+
363 
+
364  #if defined(micros)
+
365  #undef micros
+
366  inline RadioLibTime_t micros() { return((RadioLibTime_t)(STCV)); };
+
367  #endif
+
368 
+
369 #elif defined(TEENSYDUINO)
+
370  // Teensy
+
371  #define RADIOLIB_PLATFORM "Teensy"
+
372 
+
373 #elif defined(ARDUINO_ARCH_RENESAS)
+
374  // Arduino Renesas (UNO R4)
+
375  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
+
376  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
377  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
378  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
379 
+
380 #else
+
381  // other Arduino platforms not covered by the above list - this may or may not work
+
382  #define RADIOLIB_PLATFORM "Unknown Arduino"
+
383  #define RADIOLIB_UNKNOWN_PLATFORM
+
384 
+
385 #endif
+
386 
+
387  // set the default values for all macros
+
388  // these will be applied if they were not defined above
+
389  #if !defined(RADIOLIB_NC)
+
390  #define RADIOLIB_NC (0xFFFFFFFF)
+
391  #endif
+
392 
+
393  #if !defined(RADIOLIB_DEFAULT_SPI)
+
394  #define RADIOLIB_DEFAULT_SPI SPI
+
395  #endif
+
396 
+
397  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
+
398  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
399  #endif
+
400 
+
401  #if !defined(RADIOLIB_NONVOLATILE)
+
402  #define RADIOLIB_NONVOLATILE PROGMEM
+
403  #endif
+
404 
+
405  #if !defined(RADIOLIB_NONVOLATILE_PTR)
+
406  #define RADIOLIB_NONVOLATILE_PTR PGM_P
+
407  #endif
+
408 
+
409  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
+
410  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
411  #endif
+
412 
+
413  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
+
414  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
+
415  #endif
+
416 
+
417  #if !defined(RADIOLIB_TYPE_ALIAS)
+
418  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
419  #endif
+
420 
+
421  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
+
422  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
+
423  #endif
+
424 
+
425  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
+
426  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
+
427  #endif
+
428 
+
429  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
+
430  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
431  #endif
+
432 
+
433 #else
+
434  // generic non-Arduino platform
+
435  #define RADIOLIB_PLATFORM "Generic"
+
436 
+
437  #define RADIOLIB_NC (0xFF)
+
438  #define RADIOLIB_NONVOLATILE
+
439  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
+
440  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
+
441  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
442 
+
443  #if !defined(RADIOLIB_DEBUG_PORT)
+
444  #define RADIOLIB_DEBUG_PORT stdout
+
445  #endif
+
446 
+
447  #define DEC 10
+
448  #define HEX 16
+
449  #define OCT 8
+
450  #define BIN 2
+
451 
+
452  #include <stdint.h>
+
453 
+
454 #endif
+
455 
+
456 // This only compiles on STM32 boards with SUBGHZ module, but also
+
457 // include when generating docs
+
458 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
+
459  #define RADIOLIB_EXCLUDE_STM32WLX (1)
+
460 #endif
+
461 
+
462 // if verbose assert is enabled, enable basic debug too
+
463 #if RADIOLIB_VERBOSE_ASSERT
+
464  #define RADIOLIB_DEBUG (1)
+
465 #endif
+
466 
+
467 // set the global debug mode flag
+
468 #if RADIOLIB_DEBUG_BASIC || RADIOLIB_DEBUG_PROTOCOL || RADIOLIB_DEBUG_SPI
+
469  #define RADIOLIB_DEBUG (1)
+
470 #else
+
471  #define RADIOLIB_DEBUG (0)
+
472 #endif
+
473 
+
474 #if RADIOLIB_DEBUG
+
475  #if defined(RADIOLIB_BUILD_ARDUINO)
+
476  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
+
477  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
+
478  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M, ##__VA_ARGS__)
+
479  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M "\n", ##__VA_ARGS__)
+
480 
+
481  // some platforms do not support printf("%f"), so it has to be done this way
+
482  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL); RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
+
483  #else
+
484  #if !defined(RADIOLIB_DEBUG_PRINT)
+
485  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
+
486  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M, ##__VA_ARGS__)
+
487  #endif
+
488  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
489  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
490  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M "\n", ##__VA_ARGS__)
+
491  #endif
+
492  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL "%.3f", VAL)
+
493  #endif
+
494 
+
495  #define RADIOLIB_DEBUG_HEXDUMP(LEVEL, ...) Module::hexdump(LEVEL, __VA_ARGS__)
+
496 #else
+
497  #define RADIOLIB_DEBUG_PRINT(...) {}
+
498  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
499  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
+
500  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
+
501 #endif
+
502 
+
503 #if RADIOLIB_DEBUG_BASIC
+
504  #define RADIOLIB_DEBUG_BASIC_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_DBG: ", __VA_ARGS__)
+
505  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
+
506  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_DBG: ", __VA_ARGS__)
+
507  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_DBG: ", __VA_ARGS__);
+
508  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_DBG: ", __VA_ARGS__);
+
509 #else
+
510  #define RADIOLIB_DEBUG_BASIC_PRINT(...) {}
+
511  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) {}
+
512  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) {}
+
513  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) {}
+
514  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) {}
+
515 #endif
+
516 
+
517 #if RADIOLIB_DEBUG_PROTOCOL
+
518  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_PRO: ", __VA_ARGS__)
+
519  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_PRO: ", __VA_ARGS__)
+
520  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_PRO: ", __VA_ARGS__);
+
521  #define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_PRO: ", __VA_ARGS__);
+
522 #else
+
523  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) {}
+
524  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) {}
+
525  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) {}
+
526  #define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) {}
+
527 #endif
+
528 
+
529 #if RADIOLIB_DEBUG_SPI
+
530  #define RADIOLIB_DEBUG_SPI_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_SPI: ", __VA_ARGS__)
+
531  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
+
532  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_SPI: ", __VA_ARGS__)
+
533  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) RADIOLIB_DEBUG_PRINTLN_LVL("", __VA_ARGS__)
+
534  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_SPI: ", __VA_ARGS__);
+
535  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_SPI: ", __VA_ARGS__);
+
536 #else
+
537  #define RADIOLIB_DEBUG_SPI_PRINT(...) {}
+
538  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) {}
+
539  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) {}
+
540  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) {}
+
541  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) {}
+
542  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) {}
+
543 #endif
+
544 
+
545 // debug info strings
+
546 #define RADIOLIB_VALUE_TO_STRING(x) #x
+
547 #define RADIOLIB_VALUE(x) RADIOLIB_VALUE_TO_STRING(x)
+
548 
+
549 #define RADIOLIB_INFO "\nRadioLib Info\nVersion: \"" \
+
550  RADIOLIB_VALUE(RADIOLIB_VERSION_MAJOR) "." \
+
551  RADIOLIB_VALUE(RADIOLIB_VERSION_MINOR) "." \
+
552  RADIOLIB_VALUE(RADIOLIB_VERSION_PATCH) "." \
+
553  RADIOLIB_VALUE(RADIOLIB_VERSION_EXTRA) "\"\n" \
+
554  "Platform: " RADIOLIB_VALUE(RADIOLIB_PLATFORM) "\n" \
+
555  "Compiled: " RADIOLIB_VALUE(__DATE__) " " RADIOLIB_VALUE(__TIME__)
+
556 
+
562 #if RADIOLIB_VERBOSE_ASSERT
+
563 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { RADIOLIB_DEBUG_BASIC_PRINTLN("%d at %s:%d", STATEVAR, __FILE__, __LINE__); return(STATEVAR); } }
+
564 #else
+
565 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
566 #endif
+
567 
+
571 #if RADIOLIB_CHECK_PARAMS
+
572  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
573 #else
+
574  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
575 #endif
+
576 
+
577 #if RADIOLIB_FIX_ERRATA_SX127X
+
578  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
579 #else
+
580  #define RADIOLIB_ERRATA_SX127X(...) {}
+
581 #endif
+
582 
+
583 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
+
584 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
+
585 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
+
586 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
587 
+
588 // version definitions
+
589 #define RADIOLIB_VERSION_MAJOR 6
+
590 #define RADIOLIB_VERSION_MINOR 6
+
591 #define RADIOLIB_VERSION_PATCH 0
+
592 #define RADIOLIB_VERSION_EXTRA 0
+
593 
+
594 #define RADIOLIB_VERSION (((RADIOLIB_VERSION_MAJOR) << 24) | ((RADIOLIB_VERSION_MINOR) << 16) | ((RADIOLIB_VERSION_PATCH) << 8) | (RADIOLIB_VERSION_EXTRA))
+
595 
+
596 #endif
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition: TypeDef.h:616