diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index c59dfd54..bdc7141b 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -170,510 +170,498 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
82 #endif
83 
84 /*
-
85  * Enable pre-defined modules when using RadioShield, disabled by default.
-
86  */
-
87 #if !defined(RADIOLIB_RADIOSHIELD)
-
88  #define RADIOLIB_RADIOSHIELD (0)
-
89 #endif
-
90 
-
91 /*
-
92  * Enable interrupt-based timing control
-
93  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
-
94  */
-
95 #if !defined(RADIOLIB_INTERRUPT_TIMING)
-
96  #define RADIOLIB_INTERRUPT_TIMING (0)
-
97 #endif
-
98 
-
99 /*
-
100  * Enable static-only memory management: no dynamic allocation will be performed.
-
101  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
102  */
-
103 #if !defined(RADIOLIB_STATIC_ONLY)
-
104  #define RADIOLIB_STATIC_ONLY (0)
-
105 #endif
-
106 
-
107 // set the size of static arrays to use
-
108 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
109  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
-
110 #endif
-
111 
-
112 /*
-
113  * Uncomment on boards whose clock runs too slow or too fast
-
114  * Set the value according to the following scheme:
-
115  * Enable timestamps on your terminal
-
116  * Print something to terminal, wait 1000 milliseconds, print something again
-
117  * If the difference is e.g. 1014 milliseconds between the prints, set this value to 14
-
118  * Or, for more accuracy, wait for 100,000 milliseconds and divide the total drift by 100
-
119  */
-
120 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
-
121  //#define RADIOLIB_CLOCK_DRIFT_MS (0)
-
122 #endif
-
123 
-
124 #if ARDUINO >= 100
-
125  // Arduino build
-
126  #include "Arduino.h"
-
127  #define RADIOLIB_BUILD_ARDUINO
-
128 #else
-
129  // generic build
-
130  #include <stdio.h>
-
131  #define RADIOLIB_BUILD_GENERIC
-
132 #endif
-
133 
-
134 #if defined(RADIOLIB_BUILD_ARDUINO)
-
135 /*
-
136  * Platform-specific configuration.
-
137  *
-
138  * RADIOLIB_PLATFORM - platform name, used in debugging to quickly check the correct platform is detected.
-
139  * RADIOLIB_NC - alias for unused pin, usually the largest possible value of uint8_t.
-
140  * RADIOLIB_DEFAULT_SPI - default SPIClass instance to use.
-
141  * RADIOLIB_NONVOLATILE - macro to place variable into program storage (usually Flash).
-
142  * RADIOLIB_NONVOLATILE_READ_BYTE - function/macro to read variables saved in program storage (usually Flash).
-
143  * RADIOLIB_TYPE_ALIAS - construct to create an alias for a type, usually vai the `using` keyword.
-
144  * RADIOLIB_TONE_UNSUPPORTED - some platforms do not have tone()/noTone(), which is required for AFSK.
-
145  * RADIOLIB_BUILTIN_MODULE - some platforms have a builtin radio module on fixed pins, this macro is used to specify that pinout.
-
146  *
-
147  * In addition, some platforms may require RadioLib to disable specific drivers (such as ESP8266).
-
148  *
-
149  * Users may also specify their own configuration by uncommenting the RADIOLIB_CUSTOM_ARDUINO,
-
150  * and then specifying all platform parameters in the section below. This will override automatic
-
151  * platform detection.
-
152  */
-
153 
-
154  // uncomment to enable custom platform definition
-
155  //#define RADIOLIB_CUSTOM_ARDUINO
+
85  * Enable interrupt-based timing control
+
86  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
+
87  */
+
88 #if !defined(RADIOLIB_INTERRUPT_TIMING)
+
89  #define RADIOLIB_INTERRUPT_TIMING (0)
+
90 #endif
+
91 
+
92 /*
+
93  * Enable static-only memory management: no dynamic allocation will be performed.
+
94  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
95  */
+
96 #if !defined(RADIOLIB_STATIC_ONLY)
+
97  #define RADIOLIB_STATIC_ONLY (0)
+
98 #endif
+
99 
+
100 // set the size of static arrays to use
+
101 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
102  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
+
103 #endif
+
104 
+
105 /*
+
106  * Uncomment on boards whose clock runs too slow or too fast
+
107  * Set the value according to the following scheme:
+
108  * Enable timestamps on your terminal
+
109  * Print something to terminal, wait 1000 milliseconds, print something again
+
110  * If the difference is e.g. 1014 milliseconds between the prints, set this value to 14
+
111  * Or, for more accuracy, wait for 100,000 milliseconds and divide the total drift by 100
+
112  */
+
113 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
+
114  //#define RADIOLIB_CLOCK_DRIFT_MS (0)
+
115 #endif
+
116 
+
117 #if ARDUINO >= 100
+
118  // Arduino build
+
119  #include "Arduino.h"
+
120  #define RADIOLIB_BUILD_ARDUINO
+
121 #else
+
122  // generic build
+
123  #include <stdio.h>
+
124  #define RADIOLIB_BUILD_GENERIC
+
125 #endif
+
126 
+
127 #if defined(RADIOLIB_BUILD_ARDUINO)
+
128 /*
+
129  * Platform-specific configuration.
+
130  *
+
131  * RADIOLIB_PLATFORM - platform name, used in debugging to quickly check the correct platform is detected.
+
132  * RADIOLIB_NC - alias for unused pin, usually the largest possible value of uint8_t.
+
133  * RADIOLIB_DEFAULT_SPI - default SPIClass instance to use.
+
134  * RADIOLIB_NONVOLATILE - macro to place variable into program storage (usually Flash).
+
135  * RADIOLIB_NONVOLATILE_READ_BYTE - function/macro to read variables saved in program storage (usually Flash).
+
136  * RADIOLIB_TYPE_ALIAS - construct to create an alias for a type, usually vai the `using` keyword.
+
137  * RADIOLIB_TONE_UNSUPPORTED - some platforms do not have tone()/noTone(), which is required for AFSK.
+
138  *
+
139  * In addition, some platforms may require RadioLib to disable specific drivers (such as ESP8266).
+
140  *
+
141  * Users may also specify their own configuration by uncommenting the RADIOLIB_CUSTOM_ARDUINO,
+
142  * and then specifying all platform parameters in the section below. This will override automatic
+
143  * platform detection.
+
144  */
+
145 
+
146  // uncomment to enable custom platform definition
+
147  //#define RADIOLIB_CUSTOM_ARDUINO
+
148 
+
149 #if defined(RADIOLIB_CUSTOM_ARDUINO)
+
150  // name for your platform
+
151  #define RADIOLIB_PLATFORM "Custom"
+
152 
+
153  // the following must be defined if the Arduino core does not support tone or yield function
+
154  //#define RADIOLIB_TONE_UNSUPPORTED
+
155  //#define RADIOLIB_YIELD_UNSUPPORTED
156 
-
157 #if defined(RADIOLIB_CUSTOM_ARDUINO)
-
158  // name for your platform
-
159  #define RADIOLIB_PLATFORM "Custom"
-
160 
-
161  // the following must be defined if the Arduino core does not support tone or yield function
-
162  //#define RADIOLIB_TONE_UNSUPPORTED
-
163  //#define RADIOLIB_YIELD_UNSUPPORTED
-
164 
-
165  // in addition, the following macros may be defined if the Arduino core differs from the defaults
-
166  #define RADIOLIB_NC (0xFFFFFFFF)
-
167  #define RADIOLIB_DEFAULT_SPI SPI
-
168  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
169  #define RADIOLIB_NONVOLATILE PROGMEM
-
170  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
171  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
-
172  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
173 
-
174  // you might also have to define these if the Arduino core has some uncommon pin mode/status types
-
175  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
-
176  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
-
177  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
-
178 
-
179  // some of RadioLib drivers may be excluded, to prevent collisions with platforms (or to speed up build process)
-
180  // the following is a complete list of all possible exclusion macros, uncomment any of them to disable that driver
-
181  // NOTE: Some of the exclusion macros are dependent on each other. For example, it is not possible to exclude RF69
-
182  // while keeping SX1231 (because RF69 is the base class for SX1231). The dependency is always uni-directional,
-
183  // so excluding SX1231 and keeping RF69 is valid.
-
184  //#define RADIOLIB_EXCLUDE_CC1101 (1)
-
185  //#define RADIOLIB_EXCLUDE_NRF24 (1)
-
186  //#define RADIOLIB_EXCLUDE_RF69 (1)
-
187  //#define RADIOLIB_EXCLUDE_SX1231 (1) // dependent on RADIOLIB_EXCLUDE_RF69
-
188  //#define RADIOLIB_EXCLUDE_SI443X (1)
-
189  //#define RADIOLIB_EXCLUDE_RFM2X (1) // dependent on RADIOLIB_EXCLUDE_SI443X
-
190  //#define RADIOLIB_EXCLUDE_SX127X (1)
-
191  //#define RADIOLIB_EXCLUDE_SX126X (1)
-
192  //#define RADIOLIB_EXCLUDE_STM32WLX (1) // dependent on RADIOLIB_EXCLUDE_SX126X
-
193  //#define RADIOLIB_EXCLUDE_SX128X (1)
-
194  //#define RADIOLIB_EXCLUDE_AFSK (1)
-
195  //#define RADIOLIB_EXCLUDE_AX25 (1)
-
196  //#define RADIOLIB_EXCLUDE_HELLSCHREIBER (1)
-
197  //#define RADIOLIB_EXCLUDE_MORSE (1)
-
198  //#define RADIOLIB_EXCLUDE_RTTY (1)
-
199  //#define RADIOLIB_EXCLUDE_SSTV (1)
-
200  //#define RADIOLIB_EXCLUDE_DIRECT_RECEIVE (1)
+
157  // in addition, the following macros may be defined if the Arduino core differs from the defaults
+
158  #define RADIOLIB_NC (0xFFFFFFFF)
+
159  #define RADIOLIB_DEFAULT_SPI SPI
+
160  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
161  #define RADIOLIB_NONVOLATILE PROGMEM
+
162  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
163  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
+
164  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
165 
+
166  // you might also have to define these if the Arduino core has some uncommon pin mode/status types
+
167  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
+
168  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
+
169  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
170 
+
171  // some of RadioLib drivers may be excluded, to prevent collisions with platforms (or to speed up build process)
+
172  // the following is a complete list of all possible exclusion macros, uncomment any of them to disable that driver
+
173  // NOTE: Some of the exclusion macros are dependent on each other. For example, it is not possible to exclude RF69
+
174  // while keeping SX1231 (because RF69 is the base class for SX1231). The dependency is always uni-directional,
+
175  // so excluding SX1231 and keeping RF69 is valid.
+
176  //#define RADIOLIB_EXCLUDE_CC1101 (1)
+
177  //#define RADIOLIB_EXCLUDE_NRF24 (1)
+
178  //#define RADIOLIB_EXCLUDE_RF69 (1)
+
179  //#define RADIOLIB_EXCLUDE_SX1231 (1) // dependent on RADIOLIB_EXCLUDE_RF69
+
180  //#define RADIOLIB_EXCLUDE_SI443X (1)
+
181  //#define RADIOLIB_EXCLUDE_RFM2X (1) // dependent on RADIOLIB_EXCLUDE_SI443X
+
182  //#define RADIOLIB_EXCLUDE_SX127X (1)
+
183  //#define RADIOLIB_EXCLUDE_SX126X (1)
+
184  //#define RADIOLIB_EXCLUDE_STM32WLX (1) // dependent on RADIOLIB_EXCLUDE_SX126X
+
185  //#define RADIOLIB_EXCLUDE_SX128X (1)
+
186  //#define RADIOLIB_EXCLUDE_AFSK (1)
+
187  //#define RADIOLIB_EXCLUDE_AX25 (1)
+
188  //#define RADIOLIB_EXCLUDE_HELLSCHREIBER (1)
+
189  //#define RADIOLIB_EXCLUDE_MORSE (1)
+
190  //#define RADIOLIB_EXCLUDE_RTTY (1)
+
191  //#define RADIOLIB_EXCLUDE_SSTV (1)
+
192  //#define RADIOLIB_EXCLUDE_DIRECT_RECEIVE (1)
+
193 
+
194 #elif defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
+
195  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
+
196  #define RADIOLIB_PLATFORM "Arduino AVR"
+
197 
+
198  #if !(defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
+
199  #define RADIOLIB_LOWEND_PLATFORM
+
200  #endif
201 
-
202 #elif defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
-
203  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
-
204  #define RADIOLIB_PLATFORM "Arduino AVR"
+
202 #elif defined(ESP8266)
+
203  // ESP8266 boards
+
204  #define RADIOLIB_PLATFORM "ESP8266"
205 
-
206  #if !(defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
-
207  #define RADIOLIB_LOWEND_PLATFORM
-
208  #endif
-
209 
-
210 #elif defined(ESP8266)
-
211  // ESP8266 boards
-
212  #define RADIOLIB_PLATFORM "ESP8266"
-
213 
-
214 #elif defined(ESP32) || defined(ARDUINO_ARCH_ESP32)
-
215  #define RADIOLIB_ESP32
-
216 
-
217  // ESP32 boards
-
218  #define RADIOLIB_PLATFORM "ESP32"
-
219 
-
220  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
-
221  #define RADIOLIB_TONE_UNSUPPORTED
-
222  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
+
206 #elif defined(ESP32) || defined(ARDUINO_ARCH_ESP32)
+
207  #define RADIOLIB_ESP32
+
208 
+
209  // ESP32 boards
+
210  #define RADIOLIB_PLATFORM "ESP32"
+
211 
+
212  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
+
213  #define RADIOLIB_TONE_UNSUPPORTED
+
214  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
+
215 
+
216 #elif defined(ARDUINO_ARCH_STM32)
+
217  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
+
218  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
+
219 
+
220 #elif defined(SAMD_SERIES)
+
221  // Adafruit SAMD boards (M0 and M4)
+
222  #define RADIOLIB_PLATFORM "Adafruit SAMD"
223 
-
224 #elif defined(ARDUINO_ARCH_STM32)
-
225  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
-
226  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
-
227 
-
228 #elif defined(SAMD_SERIES)
-
229  // Adafruit SAMD boards (M0 and M4)
-
230  #define RADIOLIB_PLATFORM "Adafruit SAMD"
-
231 
-
232 #elif defined(ARDUINO_ARCH_SAMD)
-
233  // Arduino SAMD (Zero, MKR, etc.)
-
234  #define RADIOLIB_PLATFORM "Arduino SAMD"
-
235  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
236  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
237  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
238 
-
239 #elif defined(__SAM3X8E__)
-
240  // Arduino Due
-
241  #define RADIOLIB_PLATFORM "Arduino Due"
-
242  #define RADIOLIB_TONE_UNSUPPORTED
+
224 #elif defined(ARDUINO_ARCH_SAMD)
+
225  // Arduino SAMD (Zero, MKR, etc.)
+
226  #define RADIOLIB_PLATFORM "Arduino SAMD"
+
227  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
228  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
229  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
230 
+
231 #elif defined(__SAM3X8E__)
+
232  // Arduino Due
+
233  #define RADIOLIB_PLATFORM "Arduino Due"
+
234  #define RADIOLIB_TONE_UNSUPPORTED
+
235 
+
236 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
+
237  // Adafruit nRF52 boards
+
238  #define RADIOLIB_PLATFORM "Adafruit nRF52"
+
239 
+
240 #elif defined(ARDUINO_ARC32_TOOLS)
+
241  // Intel Curie
+
242  #define RADIOLIB_PLATFORM "Intel Curie"
243 
-
244 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
-
245  // Adafruit nRF52 boards
-
246  #define RADIOLIB_PLATFORM "Adafruit nRF52"
-
247 
-
248 #elif defined(ARDUINO_ARC32_TOOLS)
-
249  // Intel Curie
-
250  #define RADIOLIB_PLATFORM "Intel Curie"
-
251 
-
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  #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
+
244 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
+
245  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
+
246  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
247  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
248  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
249  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
250 
+
251 #elif defined(ARDUINO_ARCH_APOLLO3)
+
252  // Sparkfun Apollo3 boards
+
253  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
254  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
+
255  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
256  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
257 
+
258 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
259  // Arduino Nano 33 BLE
+
260  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
261  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
262  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
263  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
264 
+
265  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
266  #define RADIOLIB_TONE_UNSUPPORTED
+
267  #define RADIOLIB_MBED_TONE_OVERRIDE
+
268 
+
269 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
270  // Arduino Portenta H7
+
271  #define RADIOLIB_PLATFORM "Portenta H7"
+
272  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
273  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
274  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
275 
+
276  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
277  #define RADIOLIB_TONE_UNSUPPORTED
+
278  #define RADIOLIB_MBED_TONE_OVERRIDE
+
279 
+
280 #elif defined(__STM32F4__) || defined(__STM32F1__)
+
281  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
282  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
283  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
+
284  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
+
285 
+
286 #elif defined(ARDUINO_ARCH_MEGAAVR)
+
287  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
288  #define RADIOLIB_PLATFORM "MegaCoreX"
+
289 
+
290 #elif defined(ARDUINO_ARCH_MBED_RP2040)
+
291  // Raspberry Pi Pico (official mbed core)
+
292  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
293  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
294  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
295  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
296 
+
297  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
298  #define RADIOLIB_TONE_UNSUPPORTED
+
299  #define RADIOLIB_MBED_TONE_OVERRIDE
+
300 
+
301 #elif defined(ARDUINO_ARCH_RP2040)
+
302  // Raspberry Pi Pico (unofficial core)
+
303  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
+
304  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
305  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
306  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
307 
+
308 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
+
309  // CubeCell
+
310  #define RADIOLIB_PLATFORM "CubeCell"
+
311  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
+
312  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
+
313  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
+
314 
+
315  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
316  #define nullptr NULL
+
317 
+
318  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
319  #undef pinMode
+
320 
+
321  // ... and uses an outdated GCC which does not support type aliases
+
322  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
323 
+
324  // ... and it also has no tone(). This platform was designed by an idiot.
+
325  #define RADIOLIB_TONE_UNSUPPORTED
326 
-
327  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
328  #define nullptr NULL
-
329 
-
330  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
331  #undef pinMode
+
327  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
+
328  #define RADIOLIB_YIELD_UNSUPPORTED
+
329  #if defined(yield)
+
330  #undef yield
+
331  #endif
332 
-
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 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  // let's start off easy - no tone on this platform, that can happen
-
350  #define RADIOLIB_TONE_UNSUPPORTED
+
333 #elif defined(RASPI)
+
334  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
+
335  #define RADIOLIB_PLATFORM "RasPiArduino"
+
336 
+
337  // let's start off easy - no tone on this platform, that can happen
+
338  #define RADIOLIB_TONE_UNSUPPORTED
+
339 
+
340  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
+
341  #define RADIOLIB_YIELD_UNSUPPORTED
+
342 
+
343  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
+
344  #define PGM_P const char *
+
345 
+
346  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
+
347  #if defined(millis)
+
348  #undef millis
+
349  inline RadioLibTime_t millis() { return((RadioLibTime_t)(STCV / 1000)); };
+
350  #endif
351 
-
352  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
-
353  #define RADIOLIB_YIELD_UNSUPPORTED
-
354 
-
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"
+
352  #if defined(micros)
+
353  #undef micros
+
354  inline RadioLibTime_t micros() { return((RadioLibTime_t)(STCV)); };
+
355  #endif
+
356 
+
357 #elif defined(TEENSYDUINO)
+
358  // Teensy
+
359  #define RADIOLIB_PLATFORM "Teensy"
+
360 
+
361 #elif defined(ARDUINO_ARCH_RENESAS)
+
362  // Arduino Renesas (UNO R4)
+
363  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
+
364  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
365  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
366  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
367 
+
368 #else
+
369  // other Arduino platforms not covered by the above list - this may or may not work
+
370  #define RADIOLIB_PLATFORM "Unknown Arduino"
+
371  #define RADIOLIB_UNKNOWN_PLATFORM
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
+
373 #endif
+
374 
+
375  // set the default values for all macros
+
376  // these will be applied if they were not defined above
+
377  #if !defined(RADIOLIB_NC)
+
378  #define RADIOLIB_NC (0xFFFFFFFF)
+
379  #endif
+
380 
+
381  #if !defined(RADIOLIB_DEFAULT_SPI)
+
382  #define RADIOLIB_DEFAULT_SPI SPI
+
383  #endif
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)
+
385  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
+
386  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
387  #endif
+
388 
+
389  #if !defined(RADIOLIB_NONVOLATILE)
+
390  #define RADIOLIB_NONVOLATILE PROGMEM
391  #endif
392 
-
393  #if !defined(RADIOLIB_DEFAULT_SPI)
-
394  #define RADIOLIB_DEFAULT_SPI SPI
+
393  #if !defined(RADIOLIB_NONVOLATILE_PTR)
+
394  #define RADIOLIB_NONVOLATILE_PTR PGM_P
395  #endif
396 
-
397  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
-
398  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
397  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
+
398  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
399  #endif
400 
-
401  #if !defined(RADIOLIB_NONVOLATILE)
-
402  #define RADIOLIB_NONVOLATILE PROGMEM
+
401  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
+
402  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
403  #endif
404 
-
405  #if !defined(RADIOLIB_NONVOLATILE_PTR)
-
406  #define RADIOLIB_NONVOLATILE_PTR PGM_P
+
405  #if !defined(RADIOLIB_TYPE_ALIAS)
+
406  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
407  #endif
408 
-
409  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
-
410  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
409  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
+
410  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
411  #endif
412 
-
413  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
-
414  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
+
413  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
+
414  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
415  #endif
416 
-
417  #if !defined(RADIOLIB_TYPE_ALIAS)
-
418  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
417  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
+
418  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
419  #endif
420 
-
421  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
-
422  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
-
423  #endif
+
421 #else
+
422  // generic non-Arduino platform
+
423  #define RADIOLIB_PLATFORM "Generic"
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)
+
425  #define RADIOLIB_NC (0xFF)
+
426  #define RADIOLIB_NONVOLATILE
+
427  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
+
428  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
+
429  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
430 
+
431  #if !defined(RADIOLIB_DEBUG_PORT)
+
432  #define RADIOLIB_DEBUG_PORT stdout
+
433  #endif
+
434 
+
435  #define DEC 10
+
436  #define HEX 16
+
437  #define OCT 8
+
438  #define BIN 2
+
439 
+
440  #include <stdint.h>
+
441 
+
442 #endif
+
443 
+
444 // This only compiles on STM32 boards with SUBGHZ module, but also
+
445 // include when generating docs
+
446 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
+
447  #define RADIOLIB_EXCLUDE_STM32WLX (1)
+
448 #endif
+
449 
+
450 // if verbose assert is enabled, enable basic debug too
+
451 #if RADIOLIB_VERBOSE_ASSERT
+
452  #define RADIOLIB_DEBUG (1)
+
453 #endif
+
454 
+
455 // set the global debug mode flag
+
456 #if RADIOLIB_DEBUG_BASIC || RADIOLIB_DEBUG_PROTOCOL || RADIOLIB_DEBUG_SPI
+
457  #define RADIOLIB_DEBUG (1)
+
458 #else
+
459  #define RADIOLIB_DEBUG (0)
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(...) rlb_printf(__VA_ARGS__)
-
477  #define RADIOLIB_DEBUG_PRINTLN(M, ...) rlb_printf(M "\n", ##__VA_ARGS__)
-
478  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) rlb_printf(LEVEL "" M, ##__VA_ARGS__)
-
479  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) rlb_printf(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, ...) rlb_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(...) {}
+
462 #if RADIOLIB_DEBUG
+
463  #if defined(RADIOLIB_BUILD_ARDUINO)
+
464  #define RADIOLIB_DEBUG_PRINT(...) rlb_printf(__VA_ARGS__)
+
465  #define RADIOLIB_DEBUG_PRINTLN(M, ...) rlb_printf(M "\n", ##__VA_ARGS__)
+
466  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) rlb_printf(LEVEL "" M, ##__VA_ARGS__)
+
467  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) rlb_printf(LEVEL "" M "\n", ##__VA_ARGS__)
+
468 
+
469  // some platforms do not support printf("%f"), so it has to be done this way
+
470  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL); RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
+
471  #else
+
472  #if !defined(RADIOLIB_DEBUG_PRINT)
+
473  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
+
474  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M, ##__VA_ARGS__)
+
475  #endif
+
476  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
477  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
478  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M "\n", ##__VA_ARGS__)
+
479  #endif
+
480  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL "%.3f", VAL)
+
481  #endif
+
482 
+
483  #define RADIOLIB_DEBUG_HEXDUMP(LEVEL, ...) rlb_hexdump(LEVEL, __VA_ARGS__)
+
484 #else
+
485  #define RADIOLIB_DEBUG_PRINT(...) {}
+
486  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
487  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
+
488  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
+
489 #endif
+
490 
+
491 #if RADIOLIB_DEBUG_BASIC
+
492  #define RADIOLIB_DEBUG_BASIC_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_DBG: ", __VA_ARGS__)
+
493  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
+
494  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_DBG: ", __VA_ARGS__)
+
495  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_DBG: ", __VA_ARGS__);
+
496  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_DBG: ", __VA_ARGS__);
+
497 #else
+
498  #define RADIOLIB_DEBUG_BASIC_PRINT(...) {}
+
499  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) {}
+
500  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) {}
+
501  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) {}
+
502  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) {}
+
503 #endif
+
504 
+
505 #if RADIOLIB_DEBUG_PROTOCOL
+
506  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_PRO: ", __VA_ARGS__)
+
507  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_PRO: ", __VA_ARGS__)
+
508  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_PRO: ", __VA_ARGS__);
+
509  #define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_PRO: ", __VA_ARGS__);
+
510 #else
+
511  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) {}
+
512  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) {}
+
513  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) {}
+
514  #define RADIOLIB_DEBUG_PROTOCOL_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
+
517 #if RADIOLIB_DEBUG_SPI
+
518  #define RADIOLIB_DEBUG_SPI_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_SPI: ", __VA_ARGS__)
+
519  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
+
520  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_SPI: ", __VA_ARGS__)
+
521  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) RADIOLIB_DEBUG_PRINTLN_LVL("", __VA_ARGS__)
+
522  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_SPI: ", __VA_ARGS__);
+
523  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_SPI: ", __VA_ARGS__);
+
524 #else
+
525  #define RADIOLIB_DEBUG_SPI_PRINT(...) {}
+
526  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) {}
+
527  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) {}
+
528  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) {}
+
529  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) {}
+
530  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) {}
+
531 #endif
+
532 
+
533 // debug info strings
+
534 #define RADIOLIB_VALUE_TO_STRING(x) #x
+
535 #define RADIOLIB_VALUE(x) RADIOLIB_VALUE_TO_STRING(x)
+
536 
+
537 #define RADIOLIB_INFO "\nRadioLib Info\nVersion: \"" \
+
538  RADIOLIB_VALUE(RADIOLIB_VERSION_MAJOR) "." \
+
539  RADIOLIB_VALUE(RADIOLIB_VERSION_MINOR) "." \
+
540  RADIOLIB_VALUE(RADIOLIB_VERSION_PATCH) "." \
+
541  RADIOLIB_VALUE(RADIOLIB_VERSION_EXTRA) "\"\n" \
+
542  "Platform: " RADIOLIB_VALUE(RADIOLIB_PLATFORM) "\n" \
+
543  "Compiled: " RADIOLIB_VALUE(__DATE__) " " RADIOLIB_VALUE(__TIME__)
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 7
-
590 #define RADIOLIB_VERSION_MINOR 0
-
591 #define RADIOLIB_VERSION_PATCH 2
-
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
+
550 #if RADIOLIB_VERBOSE_ASSERT
+
551 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { RADIOLIB_DEBUG_BASIC_PRINTLN("%d at %s:%d", STATEVAR, __FILE__, __LINE__); return(STATEVAR); } }
+
552 #else
+
553 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
554 #endif
+
555 
+
559 #if RADIOLIB_CHECK_PARAMS
+
560  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
561 #else
+
562  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
563 #endif
+
564 
+
565 #if RADIOLIB_FIX_ERRATA_SX127X
+
566  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
567 #else
+
568  #define RADIOLIB_ERRATA_SX127X(...) {}
+
569 #endif
+
570 
+
571 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
+
572 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
+
573 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
+
574 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
575 
+
576 // version definitions
+
577 #define RADIOLIB_VERSION_MAJOR 7
+
578 #define RADIOLIB_VERSION_MINOR 0
+
579 #define RADIOLIB_VERSION_PATCH 2
+
580 #define RADIOLIB_VERSION_EXTRA 0
+
581 
+
582 #define RADIOLIB_VERSION (((RADIOLIB_VERSION_MAJOR) << 24) | ((RADIOLIB_VERSION_MINOR) << 16) | ((RADIOLIB_VERSION_PATCH) << 8) | (RADIOLIB_VERSION_EXTRA))
+
583 
+
584 #endif
RadioLibTime_t
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition: TypeDef.h:642
diff --git a/_radio_lib_8h_source.html b/_radio_lib_8h_source.html index d553e976..f396566f 100644 --- a/_radio_lib_8h_source.html +++ b/_radio_lib_8h_source.html @@ -168,41 +168,7 @@ $(document).ready(function(){initNavTree('_radio_lib_8h_source.html',''); initRe
114 #include "utils/CRC.h"
115 #include "utils/Cryptography.h"
116 
-
117 // only create Radio class when using RadioShield
-
118 #if RADIOLIB_RADIOSHIELD
-
119 
-
120 // RadioShield pin definitions
-
121 #define RADIOSHIELD_CS_A 10
-
122 #define RADIOSHIELD_IRQ_A 2
-
123 #define RADIOSHIELD_RST_A 9
-
124 #define RADIOSHIELD_GPIO_A 8
-
125 #define RADIOSHIELD_CS_B 5
-
126 #define RADIOSHIELD_IRQ_B 3
-
127 #define RADIOSHIELD_RST_B 7
-
128 #define RADIOSHIELD_GPIO_B 6
-
129 
-
136 class Radio {
-
137  public:
-
138 
-
139  Module* ModuleA;
-
140  Module* ModuleB;
-
141 
-
145  Radio() {
-
146  ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_IRQ_A, RADIOSHIELD_RST_A, RADIOSHIELD_GPIO_A);
-
147  ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_IRQ_B, RADIOSHIELD_RST_B, RADIOSHIELD_GPIO_B);
-
148  }
-
149 
-
150 #if RADIOLIB_GODMODE
-
151  private:
-
152 #endif
-
153 
-
154 };
-
155 
-
156 Radio RadioShield;
-
157 #endif
-
158 
-
159 #endif
-
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:66
+
117 #endif