diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index 31ff674c..1468ad7e 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -404,167 +404,164 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
316 
317  #include <stdint.h>
318 
-
319  #if !defined(min)
-
320  #define min(a,b) ((a)<(b)?(a):(b))
-
321  #endif
-
322 
-
323  #if !defined(max)
-
324  #define max(a,b) ((a)>(b)?(a):(b))
-
325  #endif
-
326 #endif
-
327 
-
328 /*
-
329  * Uncomment to enable debug output.
-
330  * Warning: Debug output will slow down the whole system significantly.
-
331  * Also, it will result in larger compiled binary.
-
332  * Levels: debug - only main info
-
333  * verbose - full transcript of all SPI communication
-
334  */
-
335 #if !defined(RADIOLIB_DEBUG)
-
336  //#define RADIOLIB_DEBUG
-
337 #endif
-
338 #if !defined(RADIOLIB_VERBOSE)
-
339  //#define RADIOLIB_VERBOSE
-
340 #endif
-
341 
-
342 // set which output port should be used for debug output
-
343 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
-
344 #if defined(RADIOLIB_BUILD_ARDUINO) && !defined(RADIOLIB_DEBUG_PORT)
-
345  #define RADIOLIB_DEBUG_PORT Serial
-
346 #endif
-
347 
-
348 /*
-
349  * Uncomment to enable "paranoid" SPI mode
-
350  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
-
351  * This improves reliablility, but slightly slows down communication.
-
352  * Note: Enabled by default.
-
353  */
-
354 #if !defined(RADIOLIB_SPI_PARANOID)
-
355  #define RADIOLIB_SPI_PARANOID
-
356 #endif
-
357 
-
358 /*
-
359  * Uncomment to enable parameter range checking
-
360  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
-
361  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
-
362  * possibly leading to bricked module and/or program crashing.
-
363  * Note: Enabled by default.
-
364  */
-
365 #if !defined(RADIOLIB_CHECK_PARAMS)
-
366  #define RADIOLIB_CHECK_PARAMS
-
367 #endif
-
368 
-
369 /*
-
370  * Uncomment to enable SX127x errata fix
-
371  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
-
372  * It should only be enabled if you really are observing some errata-related issue.
-
373  * Note: Disabled by default.
-
374  */
-
375 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
-
376  //#define RADIOLIB_FIX_ERRATA_SX127X
-
377 #endif
-
378 
-
379 /*
-
380  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
-
381  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
-
382  * Failure to heed the above warning may result in bricked module.
-
383  */
-
384 #if !defined(RADIOLIB_GODMODE)
-
385  //#define RADIOLIB_GODMODE
-
386 #endif
-
387 
-
388 /*
-
389  * Uncomment to enable low-level hardware access
-
390  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
-
391  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
319 #endif
+
320 
+
321 /*
+
322  * Uncomment to enable debug output.
+
323  * Warning: Debug output will slow down the whole system significantly.
+
324  * Also, it will result in larger compiled binary.
+
325  * Levels: debug - only main info
+
326  * verbose - full transcript of all SPI communication
+
327  */
+
328 #if !defined(RADIOLIB_DEBUG)
+
329  //#define RADIOLIB_DEBUG
+
330 #endif
+
331 #if !defined(RADIOLIB_VERBOSE)
+
332  //#define RADIOLIB_VERBOSE
+
333 #endif
+
334 
+
335 // set which output port should be used for debug output
+
336 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
+
337 #if defined(RADIOLIB_BUILD_ARDUINO) && !defined(RADIOLIB_DEBUG_PORT)
+
338  #define RADIOLIB_DEBUG_PORT Serial
+
339 #endif
+
340 
+
341 /*
+
342  * Uncomment to enable "paranoid" SPI mode
+
343  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
344  * This improves reliablility, but slightly slows down communication.
+
345  * Note: Enabled by default.
+
346  */
+
347 #if !defined(RADIOLIB_SPI_PARANOID)
+
348  #define RADIOLIB_SPI_PARANOID
+
349 #endif
+
350 
+
351 /*
+
352  * Uncomment to enable parameter range checking
+
353  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
354  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
355  * possibly leading to bricked module and/or program crashing.
+
356  * Note: Enabled by default.
+
357  */
+
358 #if !defined(RADIOLIB_CHECK_PARAMS)
+
359  #define RADIOLIB_CHECK_PARAMS
+
360 #endif
+
361 
+
362 /*
+
363  * Uncomment to enable SX127x errata fix
+
364  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
+
365  * It should only be enabled if you really are observing some errata-related issue.
+
366  * Note: Disabled by default.
+
367  */
+
368 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
+
369  //#define RADIOLIB_FIX_ERRATA_SX127X
+
370 #endif
+
371 
+
372 /*
+
373  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
374  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
375  * Failure to heed the above warning may result in bricked module.
+
376  */
+
377 #if !defined(RADIOLIB_GODMODE)
+
378  //#define RADIOLIB_GODMODE
+
379 #endif
+
380 
+
381 /*
+
382  * Uncomment to enable low-level hardware access
+
383  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
+
384  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
385  */
+
386 #if !defined(RADIOLIB_LOW_LEVEL)
+
387  //#define RADIOLIB_LOW_LEVEL
+
388 #endif
+
389 
+
390 /*
+
391  * Uncomment to enable pre-defined modules when using RadioShield.
392  */
-
393 #if !defined(RADIOLIB_LOW_LEVEL)
-
394  //#define RADIOLIB_LOW_LEVEL
+
393 #if !defined(RADIOLIB_RADIOSHIELD)
+
394  //#define RADIOLIB_RADIOSHIELD
395 #endif
396 
397 /*
-
398  * Uncomment to enable pre-defined modules when using RadioShield.
-
399  */
-
400 #if !defined(RADIOLIB_RADIOSHIELD)
-
401  //#define RADIOLIB_RADIOSHIELD
-
402 #endif
-
403 
-
404 /*
-
405  * Uncomment to enable interrupt-based timing control
-
406  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
-
407  */
-
408 #if !defined(RADIOLIB_INTERRUPT_TIMING)
-
409  //#define RADIOLIB_INTERRUPT_TIMING
-
410 #endif
-
411 
-
412 /*
-
413  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
-
414  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
415  */
-
416 #if !defined(RADIOLIB_STATIC_ONLY)
-
417  //#define RADIOLIB_STATIC_ONLY
-
418 #endif
-
419 
-
420 // set the size of static arrays to use
-
421 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
422  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
-
423 #endif
-
424 
-
425 // This only compiles on STM32 boards with SUBGHZ module, but also
-
426 // include when generating docs
-
427 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
-
428  #define RADIOLIB_EXCLUDE_STM32WLX
-
429 #endif
-
430 
-
431 #if defined(RADIOLIB_DEBUG)
-
432  #if defined(RADIOLIB_BUILD_ARDUINO)
-
433  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
-
434  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
-
435  #else
-
436  #if !defined(RADIOLIB_DEBUG_PRINT)
-
437  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
-
438  #endif
-
439  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
440  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
-
441  #endif
-
442  #endif
-
443 #else
-
444  #define RADIOLIB_DEBUG_PRINT(...) {}
-
445  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
446 #endif
-
447 
-
448 #if defined(RADIOLIB_VERBOSE)
-
449  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
-
450  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
-
451 #else
-
452  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
453  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
454 #endif
-
455 
-
459 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
-
460 
-
461 
-
465 #if defined(RADIOLIB_CHECK_PARAMS)
-
466  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
467 #else
-
468  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
469 #endif
-
470 
-
471 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
-
472  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
473 #else
-
474  #define RADIOLIB_ERRATA_SX127X(...) {}
-
475 #endif
-
476 
-
477 // version definitions
-
478 #define RADIOLIB_VERSION_MAJOR (0x06)
-
479 #define RADIOLIB_VERSION_MINOR (0x00)
-
480 #define RADIOLIB_VERSION_PATCH (0x00)
-
481 #define RADIOLIB_VERSION_EXTRA (0x00)
-
482 
-
483 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
-
484 
-
485 #endif
+
398  * Uncomment to enable interrupt-based timing control
+
399  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
+
400  */
+
401 #if !defined(RADIOLIB_INTERRUPT_TIMING)
+
402  //#define RADIOLIB_INTERRUPT_TIMING
+
403 #endif
+
404 
+
405 /*
+
406  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
+
407  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
408  */
+
409 #if !defined(RADIOLIB_STATIC_ONLY)
+
410  //#define RADIOLIB_STATIC_ONLY
+
411 #endif
+
412 
+
413 // set the size of static arrays to use
+
414 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
415  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
+
416 #endif
+
417 
+
418 // This only compiles on STM32 boards with SUBGHZ module, but also
+
419 // include when generating docs
+
420 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
+
421  #define RADIOLIB_EXCLUDE_STM32WLX
+
422 #endif
+
423 
+
424 #if defined(RADIOLIB_DEBUG)
+
425  #if defined(RADIOLIB_BUILD_ARDUINO)
+
426  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
+
427  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
+
428  #else
+
429  #if !defined(RADIOLIB_DEBUG_PRINT)
+
430  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
+
431  #endif
+
432  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
433  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
434  #endif
+
435  #endif
+
436 #else
+
437  #define RADIOLIB_DEBUG_PRINT(...) {}
+
438  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
439 #endif
+
440 
+
441 #if defined(RADIOLIB_VERBOSE)
+
442  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
+
443  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
+
444 #else
+
445  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
446  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
447 #endif
+
448 
+
452 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
453 
+
457 #if defined(RADIOLIB_CHECK_PARAMS)
+
458  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
459 #else
+
460  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
461 #endif
+
462 
+
463 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
+
464  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
465 #else
+
466  #define RADIOLIB_ERRATA_SX127X(...) {}
+
467 #endif
+
468 
+
469 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
+
470 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
+
471 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
+
472 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
473 
+
474 // version definitions
+
475 #define RADIOLIB_VERSION_MAJOR (0x06)
+
476 #define RADIOLIB_VERSION_MINOR (0x00)
+
477 #define RADIOLIB_VERSION_PATCH (0x00)
+
478 #define RADIOLIB_VERSION_EXTRA (0x00)
+
479 
+
480 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+
481 
+
482 #endif