From 6c345c15de5ffc0176d05f0d4522c655e5732ca8 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 4 Dec 2021 16:05:43 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=201d42f?= =?UTF-8?q?1a0ffee1274485c2f63dfb7cf07b2c4f6ea=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 | 830 +++++++++++++++++++------------------- _module_8h_source.html | 64 +-- 2 files changed, 453 insertions(+), 441 deletions(-) diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index 39632c06..fddea110 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -600,418 +600,430 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
512  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
513  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
514 
-
515  // Arduino API callbacks
-
516  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
-
517  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
-
518  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
-
519  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
520  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
521  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
-
522  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
-
523  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
524  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
525  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
526  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
527  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
528  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
529  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
530  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
531  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
532  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
533 
-
534  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
-
535  // Arduino Portenta H7
-
536  #define RADIOLIB_PLATFORM "Portenta H7"
-
537  #define RADIOLIB_PIN_TYPE pin_size_t
-
538  #define RADIOLIB_PIN_MODE PinMode
-
539  #define RADIOLIB_PIN_STATUS PinStatus
-
540  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
541  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
542  #define RADIOLIB_NC (0xFF)
-
543  #define RADIOLIB_DEFAULT_SPI SPI
-
544  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
545  #define RADIOLIB_NONVOLATILE PROGMEM
-
546  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
547  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
548 
-
549  // Arduino API callbacks
-
550  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
-
551  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
-
552  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
-
553  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
554  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
555  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
-
556  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
-
557  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
558  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
559  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
560  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
561  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
562  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
563  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
564  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
565  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
566  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
567 
-
568  #elif defined(__STM32F4__) || defined(__STM32F1__)
-
569  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
-
570  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
-
571  #define RADIOLIB_PIN_TYPE uint8_t
-
572  #define RADIOLIB_PIN_MODE WiringPinMode
-
573  #define RADIOLIB_PIN_STATUS uint8_t
-
574  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
-
575  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
576  #define RADIOLIB_NC (0xFF)
-
577  #define RADIOLIB_DEFAULT_SPI SPI
-
578  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
579  #define RADIOLIB_NONVOLATILE PROGMEM
-
580  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
581  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
582 
-
583  // Arduino API callbacks
-
584  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8 pin, WiringPinMode mode)
-
585  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8 pin, uint8 val)
-
586  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint32_t, digitalRead, uint8 pin)
-
587  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, uint32_t frequency, uint32_t duration)
-
588  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
-
589  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode)
-
590  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8 pin)
-
591  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
592  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
593  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32 us)
-
594  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
-
595  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
-
596  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
597  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
598  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
599  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
600  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
601 
-
602  #elif defined(ARDUINO_ARCH_MEGAAVR)
-
603  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
-
604  #define RADIOLIB_PLATFORM "MegaCoreX"
-
605  #define RADIOLIB_PIN_TYPE uint8_t
-
606  #define RADIOLIB_PIN_MODE uint8_t
-
607  #define RADIOLIB_PIN_STATUS uint8_t
-
608  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
609  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
610  #define RADIOLIB_NC (0xFF)
-
611  #define RADIOLIB_DEFAULT_SPI SPI
-
612  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
613  #define RADIOLIB_NONVOLATILE PROGMEM
-
614  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
615  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
616 
-
617  // Arduino API callbacks
-
618  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
619  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
620  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin)
-
621  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
622  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
623  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*userFunc)(void), uint8_t mode)
-
624  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
625  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
626  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
627  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
628  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
629  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
630  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
631  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
632  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
633  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
634  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
635 
-
636  #elif defined(ARDUINO_ARCH_RP2040)
-
637  // Raspberry Pi Pico
-
638  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
-
639  #define RADIOLIB_PIN_TYPE pin_size_t
-
640  #define RADIOLIB_PIN_MODE PinMode
-
641  #define RADIOLIB_PIN_STATUS PinStatus
-
642  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
643  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
644  #define RADIOLIB_NC (0xFF)
-
645  #define RADIOLIB_DEFAULT_SPI SPI
-
646  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
647  #define RADIOLIB_NONVOLATILE PROGMEM
-
648  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
649  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
650 
-
651  // Arduino API callbacks
-
652  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
-
653  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
-
654  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
-
655  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
656  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
657  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
-
658  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
-
659  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
660  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
661  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
662  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
663  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
664  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
665  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
666  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
667  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
668  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
669 
-
670  #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
-
671  // CubeCell
-
672  #define RADIOLIB_PLATFORM "CubeCell"
-
673  #define RADIOLIB_PIN_TYPE uint8_t
-
674  #define RADIOLIB_PIN_MODE PINMODE
-
675  #define RADIOLIB_PIN_STATUS uint8_t
-
676  #define RADIOLIB_INTERRUPT_STATUS IrqModes
-
677  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
678  #define RADIOLIB_NC (0xFF)
-
679  #define RADIOLIB_DEFAULT_SPI SPI
-
680  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
681  #define RADIOLIB_NONVOLATILE PROGMEM
-
682  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
683 
-
684  // Arduino API callbacks
-
685  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, PINMODE mode)
-
686  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin_name, uint8_t level)
-
687  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin_name)
-
688  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
-
689  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
-
690  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin_name, GpioIrqHandler GpioIrqHandlerCallback, IrqModes interrupt_mode)
-
691  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin_name)
-
692  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
693  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t milliseconds)
-
694  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint16 microseconds)
-
695  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
-
696  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
-
697  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
698  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
699  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
700  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
701  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
702 
-
703  // provide an easy access to the on-board module
-
704  #include "board-config.h"
-
705  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
-
706 
-
707  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
708  #define nullptr NULL
-
709 
-
710  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
711  #undef pinMode
-
712 
-
713  // ... and uses an outdated GCC which does not support type aliases
-
714  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
-
715 
-
716  // ... and it also has no tone(). This platform was designed by an idiot.
-
717  #define RADIOLIB_TONE_UNSUPPORTED
+
515  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
516  #define RADIOLIB_TONE_UNSUPPORTED
+
517  #define RADIOLIB_MBED_TONE_OVERRIDE
+
518 
+
519  // Arduino API callbacks
+
520  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
+
521  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
+
522  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
+
523  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
524  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
525  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
+
526  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
+
527  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
528  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
529  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
530  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
531  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
532  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
533  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
534  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
535  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
536  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
537 
+
538  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
539  // Arduino Portenta H7
+
540  #define RADIOLIB_PLATFORM "Portenta H7"
+
541  #define RADIOLIB_PIN_TYPE pin_size_t
+
542  #define RADIOLIB_PIN_MODE PinMode
+
543  #define RADIOLIB_PIN_STATUS PinStatus
+
544  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
545  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
546  #define RADIOLIB_NC (0xFF)
+
547  #define RADIOLIB_DEFAULT_SPI SPI
+
548  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
549  #define RADIOLIB_NONVOLATILE PROGMEM
+
550  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
551  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
552 
+
553  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
554  #define RADIOLIB_TONE_UNSUPPORTED
+
555  #define RADIOLIB_MBED_TONE_OVERRIDE
+
556 
+
557  // Arduino API callbacks
+
558  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
+
559  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
+
560  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
+
561  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
562  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
563  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
+
564  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
+
565  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
566  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
567  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
568  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
569  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
570  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
571  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
572  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
573  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
574  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
575 
+
576  #elif defined(__STM32F4__) || defined(__STM32F1__)
+
577  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
578  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
579  #define RADIOLIB_PIN_TYPE uint8_t
+
580  #define RADIOLIB_PIN_MODE WiringPinMode
+
581  #define RADIOLIB_PIN_STATUS uint8_t
+
582  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
+
583  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
584  #define RADIOLIB_NC (0xFF)
+
585  #define RADIOLIB_DEFAULT_SPI SPI
+
586  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
587  #define RADIOLIB_NONVOLATILE PROGMEM
+
588  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
589  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
590 
+
591  // Arduino API callbacks
+
592  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8 pin, WiringPinMode mode)
+
593  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8 pin, uint8 val)
+
594  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint32_t, digitalRead, uint8 pin)
+
595  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, uint32_t frequency, uint32_t duration)
+
596  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
+
597  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode)
+
598  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8 pin)
+
599  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
600  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
601  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32 us)
+
602  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
+
603  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
+
604  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
605  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
606  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
607  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
608  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
609 
+
610  #elif defined(ARDUINO_ARCH_MEGAAVR)
+
611  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
612  #define RADIOLIB_PLATFORM "MegaCoreX"
+
613  #define RADIOLIB_PIN_TYPE uint8_t
+
614  #define RADIOLIB_PIN_MODE uint8_t
+
615  #define RADIOLIB_PIN_STATUS uint8_t
+
616  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
617  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
618  #define RADIOLIB_NC (0xFF)
+
619  #define RADIOLIB_DEFAULT_SPI SPI
+
620  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
621  #define RADIOLIB_NONVOLATILE PROGMEM
+
622  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
623  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
624 
+
625  // Arduino API callbacks
+
626  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
627  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
628  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin)
+
629  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
630  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
631  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*userFunc)(void), uint8_t mode)
+
632  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
633  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
634  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
635  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
636  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
637  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
638  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
639  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
640  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
641  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
642  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
643 
+
644  #elif defined(ARDUINO_ARCH_RP2040)
+
645  // Raspberry Pi Pico
+
646  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
647  #define RADIOLIB_PIN_TYPE pin_size_t
+
648  #define RADIOLIB_PIN_MODE PinMode
+
649  #define RADIOLIB_PIN_STATUS PinStatus
+
650  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
651  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
652  #define RADIOLIB_NC (0xFF)
+
653  #define RADIOLIB_DEFAULT_SPI SPI
+
654  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
655  #define RADIOLIB_NONVOLATILE PROGMEM
+
656  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
657  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
658 
+
659  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
660  #define RADIOLIB_TONE_UNSUPPORTED
+
661  #define RADIOLIB_MBED_TONE_OVERRIDE
+
662 
+
663  // Arduino API callbacks
+
664  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
+
665  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
+
666  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
+
667  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
668  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
669  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
+
670  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
+
671  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
672  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
673  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
674  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
675  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
676  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
677  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
678  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
679  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
680  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
681 
+
682  #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
+
683  // CubeCell
+
684  #define RADIOLIB_PLATFORM "CubeCell"
+
685  #define RADIOLIB_PIN_TYPE uint8_t
+
686  #define RADIOLIB_PIN_MODE PINMODE
+
687  #define RADIOLIB_PIN_STATUS uint8_t
+
688  #define RADIOLIB_INTERRUPT_STATUS IrqModes
+
689  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
690  #define RADIOLIB_NC (0xFF)
+
691  #define RADIOLIB_DEFAULT_SPI SPI
+
692  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
693  #define RADIOLIB_NONVOLATILE PROGMEM
+
694  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
695 
+
696  // Arduino API callbacks
+
697  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, PINMODE mode)
+
698  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin_name, uint8_t level)
+
699  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin_name)
+
700  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
+
701  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
+
702  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin_name, GpioIrqHandler GpioIrqHandlerCallback, IrqModes interrupt_mode)
+
703  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin_name)
+
704  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
705  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t milliseconds)
+
706  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint16 microseconds)
+
707  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
+
708  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
+
709  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
710  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
711  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
712  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
713  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
714 
+
715  // provide an easy access to the on-board module
+
716  #include "board-config.h"
+
717  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
718 
-
719  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
-
720  #define RADIOLIB_YIELD_UNSUPPORTED
-
721  #if defined(yield)
-
722  #undef yield
-
723  #endif
+
719  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
720  #define nullptr NULL
+
721 
+
722  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
723  #undef pinMode
724 
-
725  #else
-
726  // other Arduino platforms not covered by the above list - this may or may not work
-
727  #define RADIOLIB_PLATFORM "Unknown Arduino"
-
728  #define RADIOLIB_UNKNOWN_PLATFORM
-
729  #define RADIOLIB_PIN_TYPE uint8_t
-
730  #define RADIOLIB_PIN_MODE uint8_t
-
731  #define RADIOLIB_PIN_STATUS uint8_t
-
732  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
733  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
734  #define RADIOLIB_NC (0xFF)
-
735  #define RADIOLIB_DEFAULT_SPI SPI
-
736  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
737  #define RADIOLIB_NONVOLATILE PROGMEM
-
738  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
739  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
740 
-
741  // Arduino API callbacks
-
742  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
743  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
744  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
-
745  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
746  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
747  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
-
748  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
749  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
750  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
751  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
752  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
753  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
754  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
755  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
756  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
757  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
758  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
759 
-
760  #endif
-
761 #endif
-
762 
-
763 #else
-
764  // generic non-Arduino platform
-
765  #define RADIOLIB_PLATFORM "Generic"
-
766 
-
767  // platform properties may be defined here, or somewhere else in the build system
-
768 
-
769 #endif
-
770 
-
771 /*
-
772  * Uncomment to enable debug output.
-
773  * Warning: Debug output will slow down the whole system significantly.
-
774  * Also, it will result in larger compiled binary.
-
775  * Levels: debug - only main info
-
776  * verbose - full transcript of all SPI communication
-
777  */
-
778 #if !defined(RADIOLIB_DEBUG)
-
779  //#define RADIOLIB_DEBUG
-
780 #endif
-
781 #if !defined(RADIOLIB_VERBOSE)
-
782  //#define RADIOLIB_VERBOSE
-
783 #endif
-
784 
-
785 // set which output port should be used for debug output
-
786 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
-
787 #if !defined(RADIOLIB_DEBUG_PORT)
-
788  #define RADIOLIB_DEBUG_PORT Serial
-
789 #endif
-
790 
-
791 /*
-
792  * Uncomment to enable "paranoid" SPI mode
-
793  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
-
794  * This improves reliablility, but slightly slows down communication.
-
795  * Note: Enabled by default.
-
796  */
-
797 #if !defined(RADIOLIB_SPI_PARANOID)
-
798  #define RADIOLIB_SPI_PARANOID
-
799 #endif
-
800 
-
801 /*
-
802  * Uncomment to enable parameter range checking
-
803  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
-
804  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
-
805  * possibly leading to bricked module and/or program crashing.
-
806  * Note: Enabled by default.
-
807  */
-
808 #if !defined(RADIOLIB_CHECK_PARAMS)
-
809  #define RADIOLIB_CHECK_PARAMS
-
810 #endif
-
811 
-
812 /*
-
813  * Uncomment to enable SX127x errata fix
-
814  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
-
815  * It should only be enabled if you really are observing some errata-related issue.
-
816  * Note: Disabled by default.
-
817  */
-
818 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
-
819  //#define RADIOLIB_FIX_ERRATA_SX127X
-
820 #endif
-
821 
-
822 /*
-
823  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
-
824  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
-
825  * Failure to heed the above warning may result in bricked module.
-
826  */
-
827 #if !defined(RADIOLIB_GODMODE)
-
828  //#define RADIOLIB_GODMODE
-
829 #endif
-
830 
-
831 /*
-
832  * Uncomment to enable low-level hardware access
-
833  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
-
834  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
-
835  */
-
836 #if !defined(RADIOLIB_LOW_LEVEL)
-
837  //#define RADIOLIB_LOW_LEVEL
-
838 #endif
-
839 
-
840 /*
-
841  * Uncomment to enable pre-defined modules when using RadioShield.
-
842  */
-
843 #if !defined(RADIOLIB_RADIOSHIELD)
-
844  //#define RADIOLIB_RADIOSHIELD
-
845 #endif
-
846 
-
847 /*
-
848  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
-
849  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
850  */
-
851 #if !defined(RADIOLIB_STATIC_ONLY)
-
852  //#define RADIOLIB_STATIC_ONLY
-
853 #endif
-
854 
-
855 // set the size of static arrays to use
-
856 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
857  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
-
858 #endif
-
859 
-
860 #if defined(RADIOLIB_DEBUG)
-
861  #if defined(RADIOLIB_BUILD_ARDUINO)
-
862  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
-
863  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
-
864  #else
-
865  #if !defined(RADIOLIB_DEBUG_PRINT)
-
866  #define RADIOLIB_DEBUG_PRINT(...) { frintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__); }
-
867  #endif
-
868  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
869  #define RADIOLIB_DEBUG_PRINTLN(...) { printf(RADIOLIB_DEBUG_PORT, __VA_ARGS__ "\n"); }
-
870  #endif
-
871  #endif
-
872 #else
-
873  #define RADIOLIB_DEBUG_PRINT(...) {}
-
874  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
875 #endif
-
876 
-
877 #if defined(RADIOLIB_VERBOSE)
-
878  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
-
879  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
-
880 #else
-
881  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
882  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
883 #endif
-
884 
-
888 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
-
889 
-
890 /*
-
891  * Macros that create callback for the hardware abstraction layer.
-
892  *
-
893  * This is the most evil thing I have ever created. I am deeply sorry to anyone currently reading this text.
-
894  * Come one, come all and witness the horror:
-
895  * Variadics, forced expansions, inlined function, string concatenation, and it even messes up access specifiers.
-
896  */
-
897 #define RADIOLIB_FIRST(arg, ...) arg
-
898 #define RADIOLIB_REST(arg, ...) __VA_ARGS__
-
899 #define RADIOLIB_EXP(...) __VA_ARGS__
-
900 
-
901 #define RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, FUNC, ...) public: typedef RET (*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC;
-
902 #define RADIOLIB_GENERATE_CALLBACK_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, __VA_ARGS__)
-
903 #define RADIOLIB_GENERATE_CALLBACK(CB) RADIOLIB_GENERATE_CALLBACK_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
-
904 
-
905 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, FUNC, ...) public: typedef RET (Module::*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC;
-
906 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, __VA_ARGS__)
-
907 #define RADIOLIB_GENERATE_CALLBACK_SPI(CB) RADIOLIB_GENERATE_CALLBACK_SPI_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
-
908 
-
912 #if defined(RADIOLIB_CHECK_PARAMS)
-
913  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
914 #else
-
915  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
916 #endif
-
917 
-
918 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
-
919  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
920 #else
-
921  #define RADIOLIB_ERRATA_SX127X(...) {}
-
922 #endif
-
923 
-
924 // version definitions
-
925 #define RADIOLIB_VERSION_MAJOR (0x05)
-
926 #define RADIOLIB_VERSION_MINOR (0x00)
-
927 #define RADIOLIB_VERSION_PATCH (0x00)
-
928 #define RADIOLIB_VERSION_EXTRA (0x00)
+
725  // ... and uses an outdated GCC which does not support type aliases
+
726  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
727 
+
728  // ... and it also has no tone(). This platform was designed by an idiot.
+
729  #define RADIOLIB_TONE_UNSUPPORTED
+
730 
+
731  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
+
732  #define RADIOLIB_YIELD_UNSUPPORTED
+
733  #if defined(yield)
+
734  #undef yield
+
735  #endif
+
736 
+
737  #else
+
738  // other Arduino platforms not covered by the above list - this may or may not work
+
739  #define RADIOLIB_PLATFORM "Unknown Arduino"
+
740  #define RADIOLIB_UNKNOWN_PLATFORM
+
741  #define RADIOLIB_PIN_TYPE uint8_t
+
742  #define RADIOLIB_PIN_MODE uint8_t
+
743  #define RADIOLIB_PIN_STATUS uint8_t
+
744  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
745  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
746  #define RADIOLIB_NC (0xFF)
+
747  #define RADIOLIB_DEFAULT_SPI SPI
+
748  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
749  #define RADIOLIB_NONVOLATILE PROGMEM
+
750  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
751  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
752 
+
753  // Arduino API callbacks
+
754  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
755  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
756  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
+
757  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
758  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
759  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
+
760  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
761  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
762  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
763  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
764  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
765  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
766  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
767  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
768  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
769  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
770  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
771 
+
772  #endif
+
773 #endif
+
774 
+
775 #else
+
776  // generic non-Arduino platform
+
777  #define RADIOLIB_PLATFORM "Generic"
+
778 
+
779  // platform properties may be defined here, or somewhere else in the build system
+
780 
+
781 #endif
+
782 
+
783 /*
+
784  * Uncomment to enable debug output.
+
785  * Warning: Debug output will slow down the whole system significantly.
+
786  * Also, it will result in larger compiled binary.
+
787  * Levels: debug - only main info
+
788  * verbose - full transcript of all SPI communication
+
789  */
+
790 #if !defined(RADIOLIB_DEBUG)
+
791  //#define RADIOLIB_DEBUG
+
792 #endif
+
793 #if !defined(RADIOLIB_VERBOSE)
+
794  //#define RADIOLIB_VERBOSE
+
795 #endif
+
796 
+
797 // set which output port should be used for debug output
+
798 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
+
799 #if !defined(RADIOLIB_DEBUG_PORT)
+
800  #define RADIOLIB_DEBUG_PORT Serial
+
801 #endif
+
802 
+
803 /*
+
804  * Uncomment to enable "paranoid" SPI mode
+
805  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
806  * This improves reliablility, but slightly slows down communication.
+
807  * Note: Enabled by default.
+
808  */
+
809 #if !defined(RADIOLIB_SPI_PARANOID)
+
810  #define RADIOLIB_SPI_PARANOID
+
811 #endif
+
812 
+
813 /*
+
814  * Uncomment to enable parameter range checking
+
815  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
816  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
817  * possibly leading to bricked module and/or program crashing.
+
818  * Note: Enabled by default.
+
819  */
+
820 #if !defined(RADIOLIB_CHECK_PARAMS)
+
821  #define RADIOLIB_CHECK_PARAMS
+
822 #endif
+
823 
+
824 /*
+
825  * Uncomment to enable SX127x errata fix
+
826  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
+
827  * It should only be enabled if you really are observing some errata-related issue.
+
828  * Note: Disabled by default.
+
829  */
+
830 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
+
831  //#define RADIOLIB_FIX_ERRATA_SX127X
+
832 #endif
+
833 
+
834 /*
+
835  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
836  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
837  * Failure to heed the above warning may result in bricked module.
+
838  */
+
839 #if !defined(RADIOLIB_GODMODE)
+
840  //#define RADIOLIB_GODMODE
+
841 #endif
+
842 
+
843 /*
+
844  * Uncomment to enable low-level hardware access
+
845  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
+
846  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
847  */
+
848 #if !defined(RADIOLIB_LOW_LEVEL)
+
849  //#define RADIOLIB_LOW_LEVEL
+
850 #endif
+
851 
+
852 /*
+
853  * Uncomment to enable pre-defined modules when using RadioShield.
+
854  */
+
855 #if !defined(RADIOLIB_RADIOSHIELD)
+
856  //#define RADIOLIB_RADIOSHIELD
+
857 #endif
+
858 
+
859 /*
+
860  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
+
861  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
862  */
+
863 #if !defined(RADIOLIB_STATIC_ONLY)
+
864  //#define RADIOLIB_STATIC_ONLY
+
865 #endif
+
866 
+
867 // set the size of static arrays to use
+
868 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
869  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
+
870 #endif
+
871 
+
872 #if defined(RADIOLIB_DEBUG)
+
873  #if defined(RADIOLIB_BUILD_ARDUINO)
+
874  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
+
875  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
+
876  #else
+
877  #if !defined(RADIOLIB_DEBUG_PRINT)
+
878  #define RADIOLIB_DEBUG_PRINT(...) { frintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__); }
+
879  #endif
+
880  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
881  #define RADIOLIB_DEBUG_PRINTLN(...) { printf(RADIOLIB_DEBUG_PORT, __VA_ARGS__ "\n"); }
+
882  #endif
+
883  #endif
+
884 #else
+
885  #define RADIOLIB_DEBUG_PRINT(...) {}
+
886  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
887 #endif
+
888 
+
889 #if defined(RADIOLIB_VERBOSE)
+
890  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
+
891  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
+
892 #else
+
893  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
894  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
895 #endif
+
896 
+
900 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
901 
+
902 /*
+
903  * Macros that create callback for the hardware abstraction layer.
+
904  *
+
905  * This is the most evil thing I have ever created. I am deeply sorry to anyone currently reading this text.
+
906  * Come one, come all and witness the horror:
+
907  * Variadics, forced expansions, inlined function, string concatenation, and it even messes up access specifiers.
+
908  */
+
909 #define RADIOLIB_FIRST(arg, ...) arg
+
910 #define RADIOLIB_REST(arg, ...) __VA_ARGS__
+
911 #define RADIOLIB_EXP(...) __VA_ARGS__
+
912 
+
913 #define RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, FUNC, ...) public: typedef RET (*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC;
+
914 #define RADIOLIB_GENERATE_CALLBACK_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, __VA_ARGS__)
+
915 #define RADIOLIB_GENERATE_CALLBACK(CB) RADIOLIB_GENERATE_CALLBACK_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
+
916 
+
917 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, FUNC, ...) public: typedef RET (Module::*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC;
+
918 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, __VA_ARGS__)
+
919 #define RADIOLIB_GENERATE_CALLBACK_SPI(CB) RADIOLIB_GENERATE_CALLBACK_SPI_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
+
920 
+
924 #if defined(RADIOLIB_CHECK_PARAMS)
+
925  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
926 #else
+
927  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
928 #endif
929 
-
930 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
-
931 
-
932 #endif
+
930 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
+
931  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
932 #else
+
933  #define RADIOLIB_ERRATA_SX127X(...) {}
+
934 #endif
+
935 
+
936 // version definitions
+
937 #define RADIOLIB_VERSION_MAJOR (0x05)
+
938 #define RADIOLIB_VERSION_MINOR (0x00)
+
939 #define RADIOLIB_VERSION_PATCH (0x00)
+
940 #define RADIOLIB_VERSION_EXTRA (0x00)
+
941 
+
942 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+
943 
+
944 #endif
diff --git a/_module_8h_source.html b/_module_8h_source.html index 795b6c08..0e6da39e 100644 --- a/_module_8h_source.html +++ b/_module_8h_source.html @@ -259,45 +259,45 @@ $(document).ready(function(){initNavTree('_module_8h_source.html',''); initResiz
431 #endif
-
void pinMode(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_MODE mode)
Arduino core pinMode override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:241
+
void pinMode(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_MODE mode)
Arduino core pinMode override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:248
RADIOLIB_PIN_TYPE getIrq() const
Access method to get the pin number of interrupt/GPIO.
Definition: Module.h:209
-
RADIOLIB_PIN_STATUS digitalRead(RADIOLIB_PIN_TYPE pin)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:255
-
void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t *dataOut, uint8_t *dataIn, uint8_t numBytes)
SPI single transfer method.
Definition: Module.cpp:194
-
uint8_t transfer(uint8_t b)
Arduino core SPI transfer override.
Definition: Module.cpp:370
-
void init()
Initialize low-level module control.
Definition: Module.cpp:98
-
int16_t SPIgetRegValue(uint8_t reg, uint8_t msb=7, uint8_t lsb=0)
SPI read method that automatically masks unused bits. This method is the preferred SPI read mechanism...
Definition: Module.cpp:117
+
RADIOLIB_PIN_STATUS digitalRead(RADIOLIB_PIN_TYPE pin)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:262
+
void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t *dataOut, uint8_t *dataIn, uint8_t numBytes)
SPI single transfer method.
Definition: Module.cpp:201
+
uint8_t transfer(uint8_t b)
Arduino core SPI transfer override.
Definition: Module.cpp:390
+
void init()
Initialize low-level module control.
Definition: Module.cpp:105
+
int16_t SPIgetRegValue(uint8_t reg, uint8_t msb=7, uint8_t lsb=0)
SPI read method that automatically masks unused bits. This method is the preferred SPI read mechanism...
Definition: Module.cpp:124
RADIOLIB_PIN_TYPE getRst() const
Access method to get the pin number of hardware reset pin.
Definition: Module.h:216
-
void begin()
Arduino core SPI begin override.
Definition: Module.cpp:356
+
void begin()
Arduino core SPI begin override.
Definition: Module.cpp:376
uint8_t SPIwriteCommand
Basic SPI write command. Defaults to 0x80.
Definition: Module.h:92
-
void delay(uint32_t ms)
Arduino core delay override.
Definition: Module.cpp:328
-
void yield()
Arduino core yield override.
Definition: Module.cpp:319
-
void digitalWrite(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_STATUS value)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:248
-
uint32_t micros()
Arduino core micros override.
Definition: Module.cpp:349
+
void delay(uint32_t ms)
Arduino core delay override.
Definition: Module.cpp:348
+
void yield()
Arduino core yield override.
Definition: Module.cpp:339
+
void digitalWrite(RADIOLIB_PIN_TYPE pin, RADIOLIB_PIN_STATUS value)
Arduino core digitalWrite override that checks RADIOLIB_NC as alias for unused pin.
Definition: Module.cpp:255
+
uint32_t micros()
Arduino core micros override.
Definition: Module.cpp:369
RADIOLIB_PIN_TYPE getCs() const
Access method to get the pin number of SPI chip select.
Definition: Module.h:202
-
int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb=7, uint8_t lsb=0, uint8_t checkInterval=2, uint8_t checkMask=0xFF)
Overwrite-safe SPI write method with verification. This method is the preferred SPI write mechanism.
Definition: Module.cpp:127
-
void tone(RADIOLIB_PIN_TYPE pin, uint16_t value, uint32_t duration=0)
Arduino core tone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPOR...
Definition: Module.cpp:262
-
void SPIwriteRegister(uint8_t reg, uint8_t data)
SPI basic write method. Use of this method is reserved for special cases, SPIsetRegValue should be us...
Definition: Module.cpp:190
-
void noTone(RADIOLIB_PIN_TYPE pin)
Arduino core noTone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPP...
Definition: Module.cpp:283
-
void endTransaction()
Arduino core SPI endTransaction override.
Definition: Module.cpp:377
-
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: Module.cpp:428
+
int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb=7, uint8_t lsb=0, uint8_t checkInterval=2, uint8_t checkMask=0xFF)
Overwrite-safe SPI write method with verification. This method is the preferred SPI write mechanism.
Definition: Module.cpp:134
+
void tone(RADIOLIB_PIN_TYPE pin, uint16_t value, uint32_t duration=0)
Arduino core tone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPPOR...
Definition: Module.cpp:269
+
void SPIwriteRegister(uint8_t reg, uint8_t data)
SPI basic write method. Use of this method is reserved for special cases, SPIsetRegValue should be us...
Definition: Module.cpp:197
+
void noTone(RADIOLIB_PIN_TYPE pin)
Arduino core noTone override that checks RADIOLIB_NC as alias for unused pin and RADIOLIB_TONE_UNSUPP...
Definition: Module.cpp:299
+
void endTransaction()
Arduino core SPI endTransaction override.
Definition: Module.cpp:397
+
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: Module.cpp:448
RADIOLIB_PIN_TYPE getGpio() const
Access method to get the pin number of second interrupt/GPIO.
Definition: Module.h:223
-
Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio=RADIOLIB_NC)
Default constructor.
Definition: Module.cpp:72
-
static uint16_t flipBits16(uint16_t i)
Function to reflect bits within an integer.
Definition: Module.cpp:420
-
uint8_t SPIreadRegister(uint8_t reg)
SPI basic read method. Use of this method is reserved for special cases, SPIgetRegValue should be use...
Definition: Module.cpp:180
+
Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio=RADIOLIB_NC)
Default constructor.
Definition: Module.cpp:79
+
static uint16_t flipBits16(uint16_t i)
Function to reflect bits within an integer.
Definition: Module.cpp:440
+
uint8_t SPIreadRegister(uint8_t reg)
SPI basic read method. Use of this method is reserved for special cases, SPIgetRegValue should be use...
Definition: Module.cpp:187
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
-
Module & operator=(const Module &mod)
Overload for assignment operator.
Definition: Module.cpp:87
-
void end()
Arduino core SPI end override.
Definition: Module.cpp:384
-
void term()
Terminate low-level module control.
Definition: Module.cpp:106
+
Module & operator=(const Module &mod)
Overload for assignment operator.
Definition: Module.cpp:94
+
void end()
Arduino core SPI end override.
Definition: Module.cpp:404
+
void term()
Terminate low-level module control.
Definition: Module.cpp:113
uint8_t SPIreadCommand
Basic SPI read command. Defaults to 0x00.
Definition: Module.h:87
-
void detachInterrupt(RADIOLIB_PIN_TYPE interruptNum)
Arduino core detachInterrupt override.
Definition: Module.cpp:312
-
void setRfSwitchState(RADIOLIB_PIN_STATUS rxPinState, RADIOLIB_PIN_STATUS txPinState)
Set RF switch state.
Definition: Module.cpp:436
-
void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t *inBytes)
SPI burst read method.
Definition: Module.cpp:176
-
static uint8_t flipBits(uint8_t b)
Function to reflect bits within a byte.
Definition: Module.cpp:413
-
uint32_t millis()
Arduino core millis override.
Definition: Module.cpp:342
-
void delayMicroseconds(uint32_t us)
Arduino core delayMicroseconds override.
Definition: Module.cpp:335
-
void attachInterrupt(RADIOLIB_PIN_TYPE interruptNum, void(*userFunc)(void), RADIOLIB_INTERRUPT_STATUS mode)
Arduino core attachInterrupt override.
Definition: Module.cpp:305
-
void beginTransaction()
Arduino core SPI beginTransaction override.
Definition: Module.cpp:363
-
void SPIwriteRegisterBurst(uint8_t reg, uint8_t *data, uint8_t numBytes)
SPI burst write method.
Definition: Module.cpp:186
+
void detachInterrupt(RADIOLIB_PIN_TYPE interruptNum)
Arduino core detachInterrupt override.
Definition: Module.cpp:332
+
void setRfSwitchState(RADIOLIB_PIN_STATUS rxPinState, RADIOLIB_PIN_STATUS txPinState)
Set RF switch state.
Definition: Module.cpp:456
+
void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t *inBytes)
SPI burst read method.
Definition: Module.cpp:183
+
static uint8_t flipBits(uint8_t b)
Function to reflect bits within a byte.
Definition: Module.cpp:433
+
uint32_t millis()
Arduino core millis override.
Definition: Module.cpp:362
+
void delayMicroseconds(uint32_t us)
Arduino core delayMicroseconds override.
Definition: Module.cpp:355
+
void attachInterrupt(RADIOLIB_PIN_TYPE interruptNum, void(*userFunc)(void), RADIOLIB_INTERRUPT_STATUS mode)
Arduino core attachInterrupt override.
Definition: Module.cpp:325
+
void beginTransaction()
Arduino core SPI beginTransaction override.
Definition: Module.cpp:383
+
void SPIwriteRegisterBurst(uint8_t reg, uint8_t *data, uint8_t numBytes)
SPI burst write method.
Definition: Module.cpp:193