diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index d39e7753..9d2c26ef 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -205,389 +205,390 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
117  // Arduino Due
118  #define RADIOLIB_PLATFORM "Arduino Due"
119  #define RADIOLIB_TONE_UNSUPPORTED
-
120 
-
121 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
-
122  // Adafruit nRF52 boards
-
123  #define RADIOLIB_PLATFORM "Adafruit nRF52"
-
124 
-
125 #elif defined(ARDUINO_ARC32_TOOLS)
-
126  // Intel Curie
-
127  #define RADIOLIB_PLATFORM "Intel Curie"
-
128 
-
129 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
-
130  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
-
131  #define RADIOLIB_PLATFORM "Arduino megaAVR"
-
132 
-
133 #elif defined(ARDUINO_ARCH_APOLLO3)
-
134  // Sparkfun Apollo3 boards
-
135  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
-
136  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
-
137  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
138  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
139 
-
140 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
-
141  // Arduino Nano 33 BLE
-
142  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
-
143  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
144  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
145  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
146 
-
147  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
148  #define RADIOLIB_TONE_UNSUPPORTED
-
149  #define RADIOLIB_MBED_TONE_OVERRIDE
-
150 
-
151 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
-
152  // Arduino Portenta H7
-
153  #define RADIOLIB_PLATFORM "Portenta H7"
-
154  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
155  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
156  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
157 
-
158  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
159  #define RADIOLIB_TONE_UNSUPPORTED
-
160  #define RADIOLIB_MBED_TONE_OVERRIDE
-
161 
-
162 #elif defined(__STM32F4__) || defined(__STM32F1__)
-
163  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
-
164  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
-
165  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
-
166  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
-
167 
-
168 #elif defined(ARDUINO_ARCH_MEGAAVR)
-
169  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
-
170  #define RADIOLIB_PLATFORM "MegaCoreX"
-
171 
-
172 #elif defined(ARDUINO_ARCH_MBED_RP2040)
-
173  // Raspberry Pi Pico (official mbed core)
-
174  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
-
175  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
176  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
177  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
178 
-
179  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
180  #define RADIOLIB_TONE_UNSUPPORTED
-
181  #define RADIOLIB_MBED_TONE_OVERRIDE
-
182 
-
183 #elif defined(ARDUINO_ARCH_RP2040)
-
184  // Raspberry Pi Pico (unofficial core)
-
185  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
-
186  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
187  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
188  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
189 
-
190 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
-
191  // CubeCell
-
192  #define RADIOLIB_PLATFORM "CubeCell"
-
193  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
-
194  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
-
195  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
-
196 
-
197  // provide an easy access to the on-board module
-
198  #include "board-config.h"
-
199  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
-
200 
-
201  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
202  #define nullptr NULL
-
203 
-
204  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
205  #undef pinMode
-
206 
-
207  // ... and uses an outdated GCC which does not support type aliases
-
208  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
-
209 
-
210  // ... and it also has no tone(). This platform was designed by an idiot.
-
211  #define RADIOLIB_TONE_UNSUPPORTED
-
212 
-
213  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
-
214  #define RADIOLIB_YIELD_UNSUPPORTED
-
215  #if defined(yield)
-
216  #undef yield
-
217  #endif
-
218 
-
219 #elif defined(RASPI)
-
220  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
-
221  #define RADIOLIB_PLATFORM "RasPiArduino"
-
222 
-
223  // let's start off easy - no tone on this platform, that can happen
-
224  #define RADIOLIB_TONE_UNSUPPORTED
-
225 
-
226  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
-
227  #define RADIOLIB_YIELD_UNSUPPORTED
-
228 
-
229  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
-
230  #define PGM_P const char *
-
231 
-
232  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
-
233  #if defined(millis)
-
234  #undef millis
-
235  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
-
236  #endif
-
237 
-
238  #if defined(micros)
-
239  #undef micros
-
240  inline unsigned long micros() { return((unsigned long)(STCV)); };
-
241  #endif
-
242 
-
243 #elif defined(TEENSYDUINO)
-
244  // Teensy
-
245  #define RADIOLIB_PLATFORM "Teensy"
-
246 
-
247 #elif defined(ARDUINO_ARCH_RENESAS)
-
248  // Arduino Renesas (UNO R4)
-
249  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
-
250  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
251  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
252  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
253 
-
254 #else
-
255  // other Arduino platforms not covered by the above list - this may or may not work
-
256  #define RADIOLIB_PLATFORM "Unknown Arduino"
-
257  #define RADIOLIB_UNKNOWN_PLATFORM
-
258 
-
259 #endif
-
260 
-
261  // set the default values for all macros
-
262  // these will be applied if they were not defined above
-
263  #if !defined(RADIOLIB_NC)
-
264  #define RADIOLIB_NC (0xFFFFFFFF)
-
265  #endif
-
266 
-
267  #if !defined(RADIOLIB_DEFAULT_SPI)
-
268  #define RADIOLIB_DEFAULT_SPI SPI
-
269  #endif
-
270 
-
271  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
-
272  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
273  #endif
-
274 
-
275  #if !defined(RADIOLIB_NONVOLATILE)
-
276  #define RADIOLIB_NONVOLATILE PROGMEM
-
277  #endif
-
278 
-
279  #if !defined(RADIOLIB_NONVOLATILE_PTR)
-
280  #define RADIOLIB_NONVOLATILE_PTR PGM_P
-
281  #endif
-
282 
-
283  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
-
284  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
285  #endif
-
286 
-
287  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
-
288  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
-
289  #endif
-
290 
-
291  #if !defined(RADIOLIB_TYPE_ALIAS)
-
292  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
293  #endif
-
294 
-
295  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
-
296  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
-
297  #endif
-
298 
-
299  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
-
300  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
-
301  #endif
-
302 
-
303  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
-
304  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
-
305  #endif
-
306 
-
307 #else
-
308  // generic non-Arduino platform
-
309  #define RADIOLIB_PLATFORM "Generic"
-
310 
-
311  #define RADIOLIB_NC (0xFF)
-
312  #define RADIOLIB_NONVOLATILE
-
313  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
-
314  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
-
315  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
316 
-
317  #if !defined(RADIOLIB_DEBUG_PORT)
-
318  #define RADIOLIB_DEBUG_PORT stdout
-
319  #endif
-
320 
-
321  #define DEC 10
-
322  #define HEX 16
-
323  #define OCT 8
-
324  #define BIN 2
-
325 
-
326  #include <stdint.h>
-
327 
-
328 #endif
-
329 
-
330 /*
-
331  * Uncomment to enable debug output.
-
332  * Warning: Debug output will slow down the whole system significantly.
-
333  * Also, it will result in larger compiled binary.
-
334  * Levels: debug - only main info
-
335  * verbose - full transcript of all SPI communication
-
336  */
-
337 #if !defined(RADIOLIB_DEBUG)
-
338  //#define RADIOLIB_DEBUG
-
339 #endif
-
340 #if !defined(RADIOLIB_VERBOSE)
-
341  //#define RADIOLIB_VERBOSE
-
342 #endif
-
343 
-
344 // set which output port should be used for debug output
-
345 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
-
346 #if defined(RADIOLIB_BUILD_ARDUINO) && !defined(RADIOLIB_DEBUG_PORT)
-
347  #define RADIOLIB_DEBUG_PORT Serial
-
348 #endif
-
349 
-
350 /*
-
351  * Uncomment to enable "paranoid" SPI mode
-
352  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
-
353  * This improves reliability, but slightly slows down communication.
-
354  * Note: Enabled by default.
-
355  */
-
356 #if !defined(RADIOLIB_SPI_PARANOID)
-
357  #define RADIOLIB_SPI_PARANOID
-
358 #endif
-
359 
-
360 /*
-
361  * Uncomment to enable parameter range checking
-
362  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
-
363  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
-
364  * possibly leading to bricked module and/or program crashing.
-
365  * Note: Enabled by default.
-
366  */
-
367 #if !defined(RADIOLIB_CHECK_PARAMS)
-
368  #define RADIOLIB_CHECK_PARAMS
-
369 #endif
-
370 
-
371 /*
-
372  * Uncomment to enable SX127x errata fix
-
373  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
-
374  * It should only be enabled if you really are observing some errata-related issue.
-
375  * Note: Disabled by default.
-
376  */
-
377 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
-
378  //#define RADIOLIB_FIX_ERRATA_SX127X
-
379 #endif
-
380 
-
381 /*
-
382  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
-
383  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
-
384  * Failure to heed the above warning may result in bricked module.
-
385  */
-
386 #if !defined(RADIOLIB_GODMODE)
-
387  //#define RADIOLIB_GODMODE
-
388 #endif
-
389 
-
390 /*
-
391  * Uncomment to enable low-level hardware access
-
392  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
-
393  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
-
394  */
-
395 #if !defined(RADIOLIB_LOW_LEVEL)
-
396  //#define RADIOLIB_LOW_LEVEL
-
397 #endif
-
398 
-
399 /*
-
400  * Uncomment to enable pre-defined modules when using RadioShield.
-
401  */
-
402 #if !defined(RADIOLIB_RADIOSHIELD)
-
403  //#define RADIOLIB_RADIOSHIELD
-
404 #endif
-
405 
-
406 /*
-
407  * Uncomment to enable interrupt-based timing control
-
408  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
-
409  */
-
410 #if !defined(RADIOLIB_INTERRUPT_TIMING)
-
411  //#define RADIOLIB_INTERRUPT_TIMING
-
412 #endif
-
413 
-
414 /*
-
415  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
-
416  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
417  */
-
418 #if !defined(RADIOLIB_STATIC_ONLY)
-
419  //#define RADIOLIB_STATIC_ONLY
-
420 #endif
-
421 
-
422 // set the size of static arrays to use
-
423 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
424  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
-
425 #endif
-
426 
-
427 // the base address for persistent storage
-
428 // some protocols (e.g. LoRaWAN) require a method
-
429 // to store some data persistently
-
430 // on Arduino, this will use EEPROM, on non-Arduino platform,
-
431 // it will use anything provided by the hardware abstraction layer
-
432 // RadioLib will place these starting at this address
-
433 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_BASE)
-
434  #define RADIOLIB_HAL_PERSISTENT_STORAGE_BASE (0)
-
435 #endif
-
436 
-
437 // the amount of space allocated to the persistent storage
-
438 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE)
-
439  #define RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE (0x60)
-
440 #endif
-
441 
-
442 // This only compiles on STM32 boards with SUBGHZ module, but also
-
443 // include when generating docs
-
444 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
-
445  #define RADIOLIB_EXCLUDE_STM32WLX
-
446 #endif
-
447 
-
448 #if defined(RADIOLIB_DEBUG)
-
449  #if defined(RADIOLIB_BUILD_ARDUINO)
-
450  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
-
451  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
-
452  #else
-
453  #if !defined(RADIOLIB_DEBUG_PRINT)
-
454  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
-
455  #endif
-
456  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
457  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
-
458  #endif
-
459  #endif
-
460  #define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)
-
461 #else
-
462  #define RADIOLIB_DEBUG_PRINT(...) {}
-
463  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
464  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
-
465 #endif
-
466 
-
467 #if defined(RADIOLIB_VERBOSE)
-
468  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
-
469  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
-
470 #else
-
471  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
472  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
473 #endif
-
474 
-
478 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
-
479 
-
483 #if defined(RADIOLIB_CHECK_PARAMS)
-
484  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
485 #else
-
486  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
487 #endif
-
488 
-
489 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
-
490  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
491 #else
-
492  #define RADIOLIB_ERRATA_SX127X(...) {}
-
493 #endif
-
494 
-
495 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
-
496 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
-
497 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
-
498 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
-
499 
-
500 // version definitions
-
501 #define RADIOLIB_VERSION_MAJOR (0x06)
-
502 #define RADIOLIB_VERSION_MINOR (0x01)
-
503 #define RADIOLIB_VERSION_PATCH (0x00)
-
504 #define RADIOLIB_VERSION_EXTRA (0x00)
-
505 
-
506 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
-
507 
-
508 #endif
+
120  #define RADIOLIB_EEPROM_UNSUPPORTED
+
121 
+
122 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
+
123  // Adafruit nRF52 boards
+
124  #define RADIOLIB_PLATFORM "Adafruit nRF52"
+
125 
+
126 #elif defined(ARDUINO_ARC32_TOOLS)
+
127  // Intel Curie
+
128  #define RADIOLIB_PLATFORM "Intel Curie"
+
129 
+
130 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
+
131  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
+
132  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
133 
+
134 #elif defined(ARDUINO_ARCH_APOLLO3)
+
135  // Sparkfun Apollo3 boards
+
136  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
137  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
+
138  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
139  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
140 
+
141 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
142  // Arduino Nano 33 BLE
+
143  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
144  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
145  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
146  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
147 
+
148  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
149  #define RADIOLIB_TONE_UNSUPPORTED
+
150  #define RADIOLIB_MBED_TONE_OVERRIDE
+
151 
+
152 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
153  // Arduino Portenta H7
+
154  #define RADIOLIB_PLATFORM "Portenta H7"
+
155  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
156  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
157  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
158 
+
159  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
160  #define RADIOLIB_TONE_UNSUPPORTED
+
161  #define RADIOLIB_MBED_TONE_OVERRIDE
+
162 
+
163 #elif defined(__STM32F4__) || defined(__STM32F1__)
+
164  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
165  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
166  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
+
167  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
+
168 
+
169 #elif defined(ARDUINO_ARCH_MEGAAVR)
+
170  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
171  #define RADIOLIB_PLATFORM "MegaCoreX"
+
172 
+
173 #elif defined(ARDUINO_ARCH_MBED_RP2040)
+
174  // Raspberry Pi Pico (official mbed core)
+
175  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
176  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
177  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
178  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
179 
+
180  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
181  #define RADIOLIB_TONE_UNSUPPORTED
+
182  #define RADIOLIB_MBED_TONE_OVERRIDE
+
183 
+
184 #elif defined(ARDUINO_ARCH_RP2040)
+
185  // Raspberry Pi Pico (unofficial core)
+
186  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
+
187  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
188  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
189  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
190 
+
191 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
+
192  // CubeCell
+
193  #define RADIOLIB_PLATFORM "CubeCell"
+
194  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
+
195  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
+
196  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
+
197 
+
198  // provide an easy access to the on-board module
+
199  #include "board-config.h"
+
200  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
+
201 
+
202  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
203  #define nullptr NULL
+
204 
+
205  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
206  #undef pinMode
+
207 
+
208  // ... and uses an outdated GCC which does not support type aliases
+
209  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
210 
+
211  // ... and it also has no tone(). This platform was designed by an idiot.
+
212  #define RADIOLIB_TONE_UNSUPPORTED
+
213 
+
214  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
+
215  #define RADIOLIB_YIELD_UNSUPPORTED
+
216  #if defined(yield)
+
217  #undef yield
+
218  #endif
+
219 
+
220 #elif defined(RASPI)
+
221  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
+
222  #define RADIOLIB_PLATFORM "RasPiArduino"
+
223 
+
224  // let's start off easy - no tone on this platform, that can happen
+
225  #define RADIOLIB_TONE_UNSUPPORTED
+
226 
+
227  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
+
228  #define RADIOLIB_YIELD_UNSUPPORTED
+
229 
+
230  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
+
231  #define PGM_P const char *
+
232 
+
233  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
+
234  #if defined(millis)
+
235  #undef millis
+
236  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
+
237  #endif
+
238 
+
239  #if defined(micros)
+
240  #undef micros
+
241  inline unsigned long micros() { return((unsigned long)(STCV)); };
+
242  #endif
+
243 
+
244 #elif defined(TEENSYDUINO)
+
245  // Teensy
+
246  #define RADIOLIB_PLATFORM "Teensy"
+
247 
+
248 #elif defined(ARDUINO_ARCH_RENESAS)
+
249  // Arduino Renesas (UNO R4)
+
250  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
+
251  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
252  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
253  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
254 
+
255 #else
+
256  // other Arduino platforms not covered by the above list - this may or may not work
+
257  #define RADIOLIB_PLATFORM "Unknown Arduino"
+
258  #define RADIOLIB_UNKNOWN_PLATFORM
+
259 
+
260 #endif
+
261 
+
262  // set the default values for all macros
+
263  // these will be applied if they were not defined above
+
264  #if !defined(RADIOLIB_NC)
+
265  #define RADIOLIB_NC (0xFFFFFFFF)
+
266  #endif
+
267 
+
268  #if !defined(RADIOLIB_DEFAULT_SPI)
+
269  #define RADIOLIB_DEFAULT_SPI SPI
+
270  #endif
+
271 
+
272  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
+
273  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
274  #endif
+
275 
+
276  #if !defined(RADIOLIB_NONVOLATILE)
+
277  #define RADIOLIB_NONVOLATILE PROGMEM
+
278  #endif
+
279 
+
280  #if !defined(RADIOLIB_NONVOLATILE_PTR)
+
281  #define RADIOLIB_NONVOLATILE_PTR PGM_P
+
282  #endif
+
283 
+
284  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
+
285  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
286  #endif
+
287 
+
288  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
+
289  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
+
290  #endif
+
291 
+
292  #if !defined(RADIOLIB_TYPE_ALIAS)
+
293  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
294  #endif
+
295 
+
296  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
+
297  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
+
298  #endif
+
299 
+
300  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
+
301  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
+
302  #endif
+
303 
+
304  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
+
305  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
306  #endif
+
307 
+
308 #else
+
309  // generic non-Arduino platform
+
310  #define RADIOLIB_PLATFORM "Generic"
+
311 
+
312  #define RADIOLIB_NC (0xFF)
+
313  #define RADIOLIB_NONVOLATILE
+
314  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
+
315  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
+
316  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
317 
+
318  #if !defined(RADIOLIB_DEBUG_PORT)
+
319  #define RADIOLIB_DEBUG_PORT stdout
+
320  #endif
+
321 
+
322  #define DEC 10
+
323  #define HEX 16
+
324  #define OCT 8
+
325  #define BIN 2
+
326 
+
327  #include <stdint.h>
+
328 
+
329 #endif
+
330 
+
331 /*
+
332  * Uncomment to enable debug output.
+
333  * Warning: Debug output will slow down the whole system significantly.
+
334  * Also, it will result in larger compiled binary.
+
335  * Levels: debug - only main info
+
336  * verbose - full transcript of all SPI communication
+
337  */
+
338 #if !defined(RADIOLIB_DEBUG)
+
339  //#define RADIOLIB_DEBUG
+
340 #endif
+
341 #if !defined(RADIOLIB_VERBOSE)
+
342  //#define RADIOLIB_VERBOSE
+
343 #endif
+
344 
+
345 // set which output port should be used for debug output
+
346 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
+
347 #if defined(RADIOLIB_BUILD_ARDUINO) && !defined(RADIOLIB_DEBUG_PORT)
+
348  #define RADIOLIB_DEBUG_PORT Serial
+
349 #endif
+
350 
+
351 /*
+
352  * Uncomment to enable "paranoid" SPI mode
+
353  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
354  * This improves reliability, but slightly slows down communication.
+
355  * Note: Enabled by default.
+
356  */
+
357 #if !defined(RADIOLIB_SPI_PARANOID)
+
358  #define RADIOLIB_SPI_PARANOID
+
359 #endif
+
360 
+
361 /*
+
362  * Uncomment to enable parameter range checking
+
363  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
364  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
365  * possibly leading to bricked module and/or program crashing.
+
366  * Note: Enabled by default.
+
367  */
+
368 #if !defined(RADIOLIB_CHECK_PARAMS)
+
369  #define RADIOLIB_CHECK_PARAMS
+
370 #endif
+
371 
+
372 /*
+
373  * Uncomment to enable SX127x errata fix
+
374  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
+
375  * It should only be enabled if you really are observing some errata-related issue.
+
376  * Note: Disabled by default.
+
377  */
+
378 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
+
379  //#define RADIOLIB_FIX_ERRATA_SX127X
+
380 #endif
+
381 
+
382 /*
+
383  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
384  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
385  * Failure to heed the above warning may result in bricked module.
+
386  */
+
387 #if !defined(RADIOLIB_GODMODE)
+
388  //#define RADIOLIB_GODMODE
+
389 #endif
+
390 
+
391 /*
+
392  * Uncomment to enable low-level hardware access
+
393  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
+
394  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
395  */
+
396 #if !defined(RADIOLIB_LOW_LEVEL)
+
397  //#define RADIOLIB_LOW_LEVEL
+
398 #endif
+
399 
+
400 /*
+
401  * Uncomment to enable pre-defined modules when using RadioShield.
+
402  */
+
403 #if !defined(RADIOLIB_RADIOSHIELD)
+
404  //#define RADIOLIB_RADIOSHIELD
+
405 #endif
+
406 
+
407 /*
+
408  * Uncomment to enable interrupt-based timing control
+
409  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
+
410  */
+
411 #if !defined(RADIOLIB_INTERRUPT_TIMING)
+
412  //#define RADIOLIB_INTERRUPT_TIMING
+
413 #endif
+
414 
+
415 /*
+
416  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
+
417  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
418  */
+
419 #if !defined(RADIOLIB_STATIC_ONLY)
+
420  //#define RADIOLIB_STATIC_ONLY
+
421 #endif
+
422 
+
423 // set the size of static arrays to use
+
424 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
425  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
+
426 #endif
+
427 
+
428 // the base address for persistent storage
+
429 // some protocols (e.g. LoRaWAN) require a method
+
430 // to store some data persistently
+
431 // on Arduino, this will use EEPROM, on non-Arduino platform,
+
432 // it will use anything provided by the hardware abstraction layer
+
433 // RadioLib will place these starting at this address
+
434 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_BASE)
+
435  #define RADIOLIB_HAL_PERSISTENT_STORAGE_BASE (0)
+
436 #endif
+
437 
+
438 // the amount of space allocated to the persistent storage
+
439 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE)
+
440  #define RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE (0x60)
+
441 #endif
+
442 
+
443 // This only compiles on STM32 boards with SUBGHZ module, but also
+
444 // include when generating docs
+
445 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
+
446  #define RADIOLIB_EXCLUDE_STM32WLX
+
447 #endif
+
448 
+
449 #if defined(RADIOLIB_DEBUG)
+
450  #if defined(RADIOLIB_BUILD_ARDUINO)
+
451  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
+
452  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
+
453  #else
+
454  #if !defined(RADIOLIB_DEBUG_PRINT)
+
455  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
+
456  #endif
+
457  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
458  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
459  #endif
+
460  #endif
+
461  #define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)
+
462 #else
+
463  #define RADIOLIB_DEBUG_PRINT(...) {}
+
464  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
465  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
+
466 #endif
+
467 
+
468 #if defined(RADIOLIB_VERBOSE)
+
469  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
+
470  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
+
471 #else
+
472  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
473  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
474 #endif
+
475 
+
479 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
480 
+
484 #if defined(RADIOLIB_CHECK_PARAMS)
+
485  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
486 #else
+
487  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
488 #endif
+
489 
+
490 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
+
491  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
492 #else
+
493  #define RADIOLIB_ERRATA_SX127X(...) {}
+
494 #endif
+
495 
+
496 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
+
497 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
+
498 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
+
499 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
500 
+
501 // version definitions
+
502 #define RADIOLIB_VERSION_MAJOR (0x06)
+
503 #define RADIOLIB_VERSION_MINOR (0x01)
+
504 #define RADIOLIB_VERSION_PATCH (0x00)
+
505 #define RADIOLIB_VERSION_EXTRA (0x00)
+
506 
+
507 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+
508 
+
509 #endif
diff --git a/_lo_ra_w_a_n_8h_source.html b/_lo_ra_w_a_n_8h_source.html index b4e595c4..31108ba1 100644 --- a/_lo_ra_w_a_n_8h_source.html +++ b/_lo_ra_w_a_n_8h_source.html @@ -468,17 +468,17 @@ $(document).ready(function(){initNavTree('_lo_ra_w_a_n_8h_source.html',''); init
494 
495 #endif
LoRaWANNode
LoRaWAN-compatible node (class A device).
Definition: LoRaWAN.h:278
-
LoRaWANNode::beginOTAA
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, bool force=false)
Join network by performing over-the-air activation. By this procedure, the device will perform an exc...
Definition: LoRaWAN.cpp:63
+
LoRaWANNode::beginOTAA
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, bool force=false)
Join network by performing over-the-air activation. By this procedure, the device will perform an exc...
Definition: LoRaWAN.cpp:67
LoRaWANNode::FSK
bool FSK
Set to true to force the node to only use FSK channels. Set to false by default.
Definition: LoRaWAN.h:281
-
LoRaWANNode::beginAPB
int16_t beginAPB(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:330
-
LoRaWANNode::setDeviceStatus
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:773
-
LoRaWANNode::downlink
int16_t downlink(uint8_t *data, size_t *len)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:516
+
LoRaWANNode::beginAPB
int16_t beginAPB(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:334
+
LoRaWANNode::setDeviceStatus
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:777
+
LoRaWANNode::downlink
int16_t downlink(uint8_t *data, size_t *len)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:520
LoRaWANNode::numChannels
int8_t numChannels
Number of supported channels. Some band plans only support a subset of available channels....
Definition: LoRaWAN.h:293
-
LoRaWANNode::wipe
void wipe()
Wipe internal persistent parameters. This will reset all counters and saved variables,...
Definition: LoRaWAN.cpp:38
+
LoRaWANNode::wipe
void wipe()
Wipe internal persistent parameters. This will reset all counters and saved variables,...
Definition: LoRaWAN.cpp:42
LoRaWANNode::startChannel
int8_t startChannel
Starting channel offset. Some band plans only support a subset of available channels....
Definition: LoRaWAN.h:287
-
LoRaWANNode::LoRaWANNode
LoRaWANNode(PhysicalLayer *phy, const LoRaWANBand_t *band)
Default constructor.
Definition: LoRaWAN.cpp:29
-
LoRaWANNode::uplink
int16_t uplink(const char *str, uint8_t port)
Send a message to the server.
Definition: LoRaWAN.cpp:359
-
LoRaWANNode::begin
int16_t begin()
Join network by loading information from persistent storage.
Definition: LoRaWAN.cpp:43
+
LoRaWANNode::LoRaWANNode
LoRaWANNode(PhysicalLayer *phy, const LoRaWANBand_t *band)
Default constructor.
Definition: LoRaWAN.cpp:33
+
LoRaWANNode::uplink
int16_t uplink(const char *str, uint8_t port)
Send a message to the server.
Definition: LoRaWAN.cpp:363
+
LoRaWANNode::begin
int16_t begin()
Join network by loading information from persistent storage.
Definition: LoRaWAN.cpp:47
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:34
LoRaWANBand_t
Structure to save information about LoRaWAN band.
Definition: LoRaWAN.h:208
LoRaWANBand_t::cfListType
uint8_t cfListType
Whether the optional channels are defined as list of frequencies or bit mask.
Definition: LoRaWAN.h:225