diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index 6896b43e..a79618a5 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -95,528 +95,579 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
7  * Debug output enable.
8  * Warning: Debug output will slow down the whole system significantly.
9  * Also, it will result in larger compiled binary.
-
10  * Levels: debug - only main info
-
11  * verbose - full transcript of all SPI communication
-
12  */
-
13 #if !defined(RADIOLIB_DEBUG)
-
14  #define RADIOLIB_DEBUG (0)
-
15 #endif
-
16 #if !defined(RADIOLIB_VERBOSE)
-
17  #define RADIOLIB_VERBOSE (0)
-
18 #endif
-
19 
-
20 // set which output port should be used for debug output
-
21 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
-
22 #if !defined(RADIOLIB_DEBUG_PORT)
-
23  #define RADIOLIB_DEBUG_PORT Serial
-
24 #endif
-
25 
-
26 /*
-
27  * Comment to disable "paranoid" SPI mode, or set RADIOLIB_SPI_PARANOID to 0
-
28  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
-
29  * This improves reliability, but slightly slows down communication.
-
30  * Note: Enabled by default.
-
31  */
-
32 #if !defined(RADIOLIB_SPI_PARANOID)
-
33  #define RADIOLIB_SPI_PARANOID (1)
-
34 #endif
-
35 
-
36 /*
-
37  * Comment to disable parameter range checking
-
38  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
-
39  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
-
40  * possibly leading to bricked module and/or program crashing.
-
41  * Note: Enabled by default.
-
42  */
-
43 #if !defined(RADIOLIB_CHECK_PARAMS)
-
44  #define RADIOLIB_CHECK_PARAMS (1)
-
45 #endif
-
46 
-
47 /*
-
48  * SX127x errata fix enable
-
49  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
-
50  * It should only be enabled if you really are observing some errata-related issue.
-
51  * Note: Disabled by default.
-
52  */
-
53 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
-
54  #define RADIOLIB_FIX_ERRATA_SX127X (0)
-
55 #endif
-
56 
-
57 /*
-
58  * God mode enable - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
-
59  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
-
60  * Failure to heed the above warning may result in bricked module.
-
61  */
-
62 #if !defined(RADIOLIB_GODMODE)
-
63  #define RADIOLIB_GODMODE (0)
-
64 #endif
-
65 
-
66 /*
-
67  * Low-level hardware access enable
-
68  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
-
69  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
-
70  */
-
71 #if !defined(RADIOLIB_LOW_LEVEL)
-
72  #define RADIOLIB_LOW_LEVEL (0)
-
73 #endif
-
74 
-
75 /*
-
76  * Enable pre-defined modules when using RadioShield, disabled by default.
-
77  */
-
78 #if !defined(RADIOLIB_RADIOSHIELD)
-
79  #define RADIOLIB_RADIOSHIELD (0)
-
80 #endif
-
81 
-
82 /*
-
83  * Enable interrupt-based timing control
-
84  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
-
85  */
-
86 #if !defined(RADIOLIB_INTERRUPT_TIMING)
-
87  #define RADIOLIB_INTERRUPT_TIMING (0)
-
88 #endif
-
89 
-
90 /*
-
91  * Enable static-only memory management: no dynamic allocation will be performed.
-
92  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
93  */
-
94 #if !defined(RADIOLIB_STATIC_ONLY)
-
95  #define RADIOLIB_STATIC_ONLY (0)
-
96 #endif
-
97 
-
98 // set the size of static arrays to use
-
99 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
100  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
-
101 #endif
-
102 
-
103 // the base address for persistent storage
-
104 // some protocols (e.g. LoRaWAN) require a method
-
105 // to store some data persistently
-
106 // on Arduino, this will use EEPROM, on non-Arduino platform,
-
107 // it will use anything provided by the hardware abstraction layer
-
108 // RadioLib will place these starting at this address
-
109 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_BASE)
-
110  #define RADIOLIB_HAL_PERSISTENT_STORAGE_BASE (0)
-
111 #endif
-
112 
-
113 // the amount of space allocated to the persistent storage
-
114 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE)
-
115  #define RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE (0x01C0)
-
116 #endif
-
117 
-
118 /*
-
119  * Uncomment on boards whose clock runs too slow or too fast
-
120  * Set the value according to the following scheme:
-
121  * Enable timestamps on your terminal
-
122  * Print something to terminal, wait 1000 milliseconds, print something again
-
123  * If the difference is e.g. 1014 milliseconds between the prints, set this value to 14
-
124  * Or, for more accuracy, wait for 100,000 milliseconds and divide the total drift by 100
-
125  */
-
126 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
-
127  //#define RADIOLIB_CLOCK_DRIFT_MS (0)
-
128 #endif
-
129 
-
130 #if ARDUINO >= 100
-
131  // Arduino build
-
132  #include "Arduino.h"
-
133  #define RADIOLIB_BUILD_ARDUINO
-
134 #else
-
135  // generic build
-
136  #include <stdio.h>
-
137  #define RADIOLIB_BUILD_GENERIC
-
138 #endif
-
139 
-
140 #if defined(RADIOLIB_BUILD_ARDUINO)
-
141 /*
-
142  * Platform-specific configuration.
-
143  *
-
144  * RADIOLIB_PLATFORM - platform name, used in debugging to quickly check the correct platform is detected.
-
145  * RADIOLIB_NC - alias for unused pin, usually the largest possible value of uint8_t.
-
146  * RADIOLIB_DEFAULT_SPI - default SPIClass instance to use.
-
147  * RADIOLIB_NONVOLATILE - macro to place variable into program storage (usually Flash).
-
148  * RADIOLIB_NONVOLATILE_READ_BYTE - function/macro to read variables saved in program storage (usually Flash).
-
149  * RADIOLIB_TYPE_ALIAS - construct to create an alias for a type, usually vai the `using` keyword.
-
150  * RADIOLIB_TONE_UNSUPPORTED - some platforms do not have tone()/noTone(), which is required for AFSK.
-
151  * RADIOLIB_BUILTIN_MODULE - some platforms have a builtin radio module on fixed pins, this macro is used to specify that pinout.
-
152  *
-
153  * In addition, some platforms may require RadioLib to disable specific drivers (such as ESP8266).
-
154  *
-
155  * Users may also specify their own configuration by uncommenting the RADIOLIB_CUSTOM_ARDUINO,
-
156  * and then specifying all platform parameters in the section below. This will override automatic
-
157  * platform detection.
-
158  */
-
159 
-
160  // uncomment to enable custom platform definition
-
161  //#define RADIOLIB_CUSTOM_ARDUINO
-
162 
-
163 #if defined(RADIOLIB_CUSTOM_ARDUINO)
-
164  // name for your platform
-
165  #define RADIOLIB_PLATFORM "Custom"
+
10  * Levels: basic - only main info
+
11  * protocol - mainly LoRaWAN stuff, but other protocols as well
+
12  * SPI - full transcript of all SPI communication
+
13  */
+
14 #if !defined(RADIOLIB_DEBUG_BASIC)
+
15  #define RADIOLIB_DEBUG_BASIC (0)
+
16 #endif
+
17 #if !defined(RADIOLIB_DEBUG_PROTOCOL)
+
18  #define RADIOLIB_DEBUG_PROTOCOL (0)
+
19 #endif
+
20 #if !defined(RADIOLIB_DEBUG_SPI)
+
21  #define RADIOLIB_DEBUG_SPI (0)
+
22 #endif
+
23 
+
24 // set which output port should be used for debug output
+
25 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
+
26 #if !defined(RADIOLIB_DEBUG_PORT)
+
27  #define RADIOLIB_DEBUG_PORT Serial
+
28 #endif
+
29 
+
30 /*
+
31  * Comment to disable "paranoid" SPI mode, or set RADIOLIB_SPI_PARANOID to 0
+
32  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
33  * This improves reliability, but slightly slows down communication.
+
34  * Note: Enabled by default.
+
35  */
+
36 #if !defined(RADIOLIB_SPI_PARANOID)
+
37  #define RADIOLIB_SPI_PARANOID (1)
+
38 #endif
+
39 
+
40 /*
+
41  * Comment to disable parameter range checking
+
42  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
43  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
44  * possibly leading to bricked module and/or program crashing.
+
45  * Note: Enabled by default.
+
46  */
+
47 #if !defined(RADIOLIB_CHECK_PARAMS)
+
48  #define RADIOLIB_CHECK_PARAMS (1)
+
49 #endif
+
50 
+
51 /*
+
52  * SX127x errata fix enable
+
53  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
+
54  * It should only be enabled if you really are observing some errata-related issue.
+
55  * Note: Disabled by default.
+
56  */
+
57 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
+
58  #define RADIOLIB_FIX_ERRATA_SX127X (0)
+
59 #endif
+
60 
+
61 /*
+
62  * God mode enable - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
63  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
64  * Failure to heed the above warning may result in bricked module.
+
65  */
+
66 #if !defined(RADIOLIB_GODMODE)
+
67  #define RADIOLIB_GODMODE (0)
+
68 #endif
+
69 
+
70 /*
+
71  * Low-level hardware access enable
+
72  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
+
73  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
74  */
+
75 #if !defined(RADIOLIB_LOW_LEVEL)
+
76  #define RADIOLIB_LOW_LEVEL (0)
+
77 #endif
+
78 
+
79 /*
+
80  * Enable pre-defined modules when using RadioShield, disabled by default.
+
81  */
+
82 #if !defined(RADIOLIB_RADIOSHIELD)
+
83  #define RADIOLIB_RADIOSHIELD (0)
+
84 #endif
+
85 
+
86 /*
+
87  * Enable interrupt-based timing control
+
88  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
+
89  */
+
90 #if !defined(RADIOLIB_INTERRUPT_TIMING)
+
91  #define RADIOLIB_INTERRUPT_TIMING (0)
+
92 #endif
+
93 
+
94 /*
+
95  * Enable static-only memory management: no dynamic allocation will be performed.
+
96  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
97  */
+
98 #if !defined(RADIOLIB_STATIC_ONLY)
+
99  #define RADIOLIB_STATIC_ONLY (0)
+
100 #endif
+
101 
+
102 // set the size of static arrays to use
+
103 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
104  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
+
105 #endif
+
106 
+
107 // the base address for persistent storage
+
108 // some protocols (e.g. LoRaWAN) require a method
+
109 // to store some data persistently
+
110 // on Arduino, this will use EEPROM, on non-Arduino platform,
+
111 // it will use anything provided by the hardware abstraction layer
+
112 // RadioLib will place these starting at this address
+
113 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_BASE)
+
114  #define RADIOLIB_HAL_PERSISTENT_STORAGE_BASE (0)
+
115 #endif
+
116 
+
117 // the amount of space allocated to the persistent storage
+
118 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE)
+
119  #define RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE (0x01C0)
+
120 #endif
+
121 
+
122 /*
+
123  * Uncomment on boards whose clock runs too slow or too fast
+
124  * Set the value according to the following scheme:
+
125  * Enable timestamps on your terminal
+
126  * Print something to terminal, wait 1000 milliseconds, print something again
+
127  * If the difference is e.g. 1014 milliseconds between the prints, set this value to 14
+
128  * Or, for more accuracy, wait for 100,000 milliseconds and divide the total drift by 100
+
129  */
+
130 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
+
131  //#define RADIOLIB_CLOCK_DRIFT_MS (0)
+
132 #endif
+
133 
+
134 #if ARDUINO >= 100
+
135  // Arduino build
+
136  #include "Arduino.h"
+
137  #define RADIOLIB_BUILD_ARDUINO
+
138 #else
+
139  // generic build
+
140  #include <stdio.h>
+
141  #define RADIOLIB_BUILD_GENERIC
+
142 #endif
+
143 
+
144 #if defined(RADIOLIB_BUILD_ARDUINO)
+
145 /*
+
146  * Platform-specific configuration.
+
147  *
+
148  * RADIOLIB_PLATFORM - platform name, used in debugging to quickly check the correct platform is detected.
+
149  * RADIOLIB_NC - alias for unused pin, usually the largest possible value of uint8_t.
+
150  * RADIOLIB_DEFAULT_SPI - default SPIClass instance to use.
+
151  * RADIOLIB_NONVOLATILE - macro to place variable into program storage (usually Flash).
+
152  * RADIOLIB_NONVOLATILE_READ_BYTE - function/macro to read variables saved in program storage (usually Flash).
+
153  * RADIOLIB_TYPE_ALIAS - construct to create an alias for a type, usually vai the `using` keyword.
+
154  * RADIOLIB_TONE_UNSUPPORTED - some platforms do not have tone()/noTone(), which is required for AFSK.
+
155  * RADIOLIB_BUILTIN_MODULE - some platforms have a builtin radio module on fixed pins, this macro is used to specify that pinout.
+
156  *
+
157  * In addition, some platforms may require RadioLib to disable specific drivers (such as ESP8266).
+
158  *
+
159  * Users may also specify their own configuration by uncommenting the RADIOLIB_CUSTOM_ARDUINO,
+
160  * and then specifying all platform parameters in the section below. This will override automatic
+
161  * platform detection.
+
162  */
+
163 
+
164  // uncomment to enable custom platform definition
+
165  //#define RADIOLIB_CUSTOM_ARDUINO
166 
-
167  // the following must be defined if the Arduino core does not support tone or yield function
-
168  //#define RADIOLIB_TONE_UNSUPPORTED
-
169  //#define RADIOLIB_YIELD_UNSUPPORTED
+
167 #if defined(RADIOLIB_CUSTOM_ARDUINO)
+
168  // name for your platform
+
169  #define RADIOLIB_PLATFORM "Custom"
170 
-
171  // in addition, the following macros may be defined if the Arduino core differs from the defaults
-
172  #define RADIOLIB_NC (0xFFFFFFFF)
-
173  #define RADIOLIB_DEFAULT_SPI SPI
-
174  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
175  #define RADIOLIB_NONVOLATILE PROGMEM
-
176  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
177  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
-
178  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
179 
-
180  // you might also have to define these if the Arduino core has some uncommon pin mode/status types
-
181  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
-
182  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
-
183  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
-
184 
-
185  // some of RadioLib drivers may be excluded, to prevent collisions with platforms (or to speed up build process)
-
186  // the following is a complete list of all possible exclusion macros, uncomment any of them to disable that driver
-
187  // NOTE: Some of the exclusion macros are dependent on each other. For example, it is not possible to exclude RF69
-
188  // while keeping SX1231 (because RF69 is the base class for SX1231). The dependency is always uni-directional,
-
189  // so excluding SX1231 and keeping RF69 is valid.
-
190  //#define RADIOLIB_EXCLUDE_CC1101 (1)
-
191  //#define RADIOLIB_EXCLUDE_NRF24 (1)
-
192  //#define RADIOLIB_EXCLUDE_RF69 (1)
-
193  //#define RADIOLIB_EXCLUDE_SX1231 (1) // dependent on RADIOLIB_EXCLUDE_RF69
-
194  //#define RADIOLIB_EXCLUDE_SI443X (1)
-
195  //#define RADIOLIB_EXCLUDE_RFM2X (1) // dependent on RADIOLIB_EXCLUDE_SI443X
-
196  //#define RADIOLIB_EXCLUDE_SX127X (1)
-
197  //#define RADIOLIB_EXCLUDE_SX126X (1)
-
198  //#define RADIOLIB_EXCLUDE_STM32WLX (1) // dependent on RADIOLIB_EXCLUDE_SX126X
-
199  //#define RADIOLIB_EXCLUDE_SX128X (1)
-
200  //#define RADIOLIB_EXCLUDE_AFSK (1)
-
201  //#define RADIOLIB_EXCLUDE_AX25 (1)
-
202  //#define RADIOLIB_EXCLUDE_HELLSCHREIBER (1)
-
203  //#define RADIOLIB_EXCLUDE_MORSE (1)
-
204  //#define RADIOLIB_EXCLUDE_RTTY (1)
-
205  //#define RADIOLIB_EXCLUDE_SSTV (1)
-
206  //#define RADIOLIB_EXCLUDE_DIRECT_RECEIVE (1)
-
207 
-
208 #elif defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
-
209  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
-
210  #define RADIOLIB_PLATFORM "Arduino AVR"
+
171  // the following must be defined if the Arduino core does not support tone or yield function
+
172  //#define RADIOLIB_TONE_UNSUPPORTED
+
173  //#define RADIOLIB_YIELD_UNSUPPORTED
+
174 
+
175  // in addition, the following macros may be defined if the Arduino core differs from the defaults
+
176  #define RADIOLIB_NC (0xFFFFFFFF)
+
177  #define RADIOLIB_DEFAULT_SPI SPI
+
178  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
179  #define RADIOLIB_NONVOLATILE PROGMEM
+
180  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
181  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
+
182  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
183 
+
184  // you might also have to define these if the Arduino core has some uncommon pin mode/status types
+
185  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
+
186  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
+
187  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
188 
+
189  // some of RadioLib drivers may be excluded, to prevent collisions with platforms (or to speed up build process)
+
190  // the following is a complete list of all possible exclusion macros, uncomment any of them to disable that driver
+
191  // NOTE: Some of the exclusion macros are dependent on each other. For example, it is not possible to exclude RF69
+
192  // while keeping SX1231 (because RF69 is the base class for SX1231). The dependency is always uni-directional,
+
193  // so excluding SX1231 and keeping RF69 is valid.
+
194  //#define RADIOLIB_EXCLUDE_CC1101 (1)
+
195  //#define RADIOLIB_EXCLUDE_NRF24 (1)
+
196  //#define RADIOLIB_EXCLUDE_RF69 (1)
+
197  //#define RADIOLIB_EXCLUDE_SX1231 (1) // dependent on RADIOLIB_EXCLUDE_RF69
+
198  //#define RADIOLIB_EXCLUDE_SI443X (1)
+
199  //#define RADIOLIB_EXCLUDE_RFM2X (1) // dependent on RADIOLIB_EXCLUDE_SI443X
+
200  //#define RADIOLIB_EXCLUDE_SX127X (1)
+
201  //#define RADIOLIB_EXCLUDE_SX126X (1)
+
202  //#define RADIOLIB_EXCLUDE_STM32WLX (1) // dependent on RADIOLIB_EXCLUDE_SX126X
+
203  //#define RADIOLIB_EXCLUDE_SX128X (1)
+
204  //#define RADIOLIB_EXCLUDE_AFSK (1)
+
205  //#define RADIOLIB_EXCLUDE_AX25 (1)
+
206  //#define RADIOLIB_EXCLUDE_HELLSCHREIBER (1)
+
207  //#define RADIOLIB_EXCLUDE_MORSE (1)
+
208  //#define RADIOLIB_EXCLUDE_RTTY (1)
+
209  //#define RADIOLIB_EXCLUDE_SSTV (1)
+
210  //#define RADIOLIB_EXCLUDE_DIRECT_RECEIVE (1)
211 
-
212  #if !(defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
-
213  #define RADIOLIB_LOWEND_PLATFORM
-
214  #endif
+
212 #elif defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
+
213  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
+
214  #define RADIOLIB_PLATFORM "Arduino AVR"
215 
-
216 #elif defined(ESP8266)
-
217  // ESP8266 boards
-
218  #define RADIOLIB_PLATFORM "ESP8266"
+
216  #if !(defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
+
217  #define RADIOLIB_LOWEND_PLATFORM
+
218  #endif
219 
-
220 #elif defined(ESP32) || defined(ARDUINO_ARCH_ESP32)
-
221  #define RADIOLIB_ESP32
-
222 
-
223  // ESP32 boards
-
224  #define RADIOLIB_PLATFORM "ESP32"
-
225 
-
226  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
-
227  #define RADIOLIB_TONE_UNSUPPORTED
-
228  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
-
229 
-
230 #elif defined(ARDUINO_ARCH_STM32)
-
231  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
-
232  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
+
220 #elif defined(ESP8266)
+
221  // ESP8266 boards
+
222  #define RADIOLIB_PLATFORM "ESP8266"
+
223 
+
224 #elif defined(ESP32) || defined(ARDUINO_ARCH_ESP32)
+
225  #define RADIOLIB_ESP32
+
226 
+
227  // ESP32 boards
+
228  #define RADIOLIB_PLATFORM "ESP32"
+
229 
+
230  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
+
231  #define RADIOLIB_TONE_UNSUPPORTED
+
232  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
233 
-
234 #elif defined(SAMD_SERIES)
-
235  // Adafruit SAMD boards (M0 and M4)
-
236  #define RADIOLIB_PLATFORM "Adafruit SAMD"
-
237  #define RADIOLIB_EEPROM_UNSUPPORTED
-
238 
-
239 #elif defined(ARDUINO_ARCH_SAMD)
-
240  // Arduino SAMD (Zero, MKR, etc.)
-
241  #define RADIOLIB_PLATFORM "Arduino SAMD"
-
242  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
243  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
244  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
245  #define RADIOLIB_EEPROM_UNSUPPORTED
-
246 
-
247 #elif defined(__SAM3X8E__)
-
248  // Arduino Due
-
249  #define RADIOLIB_PLATFORM "Arduino Due"
-
250  #define RADIOLIB_TONE_UNSUPPORTED
-
251  #define RADIOLIB_EEPROM_UNSUPPORTED
-
252 
-
253 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
-
254  // Adafruit nRF52 boards
-
255  #define RADIOLIB_PLATFORM "Adafruit nRF52"
-
256  #define RADIOLIB_EEPROM_UNSUPPORTED
-
257 
-
258 #elif defined(ARDUINO_ARC32_TOOLS)
-
259  // Intel Curie
-
260  #define RADIOLIB_PLATFORM "Intel Curie"
+
234 #elif defined(ARDUINO_ARCH_STM32)
+
235  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
+
236  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
+
237 
+
238 #elif defined(SAMD_SERIES)
+
239  // Adafruit SAMD boards (M0 and M4)
+
240  #define RADIOLIB_PLATFORM "Adafruit SAMD"
+
241  #define RADIOLIB_EEPROM_UNSUPPORTED
+
242 
+
243 #elif defined(ARDUINO_ARCH_SAMD)
+
244  // Arduino SAMD (Zero, MKR, etc.)
+
245  #define RADIOLIB_PLATFORM "Arduino SAMD"
+
246  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
247  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
248  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
249  #define RADIOLIB_EEPROM_UNSUPPORTED
+
250 
+
251 #elif defined(__SAM3X8E__)
+
252  // Arduino Due
+
253  #define RADIOLIB_PLATFORM "Arduino Due"
+
254  #define RADIOLIB_TONE_UNSUPPORTED
+
255  #define RADIOLIB_EEPROM_UNSUPPORTED
+
256 
+
257 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
+
258  // Adafruit nRF52 boards
+
259  #define RADIOLIB_PLATFORM "Adafruit nRF52"
+
260  #define RADIOLIB_EEPROM_UNSUPPORTED
261 
-
262 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
-
263  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
-
264  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
262 #elif defined(ARDUINO_ARC32_TOOLS)
+
263  // Intel Curie
+
264  #define RADIOLIB_PLATFORM "Intel Curie"
265 
-
266 #elif defined(ARDUINO_ARCH_APOLLO3)
-
267  // Sparkfun Apollo3 boards
-
268  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
-
269  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
-
270  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
271  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
272 
-
273 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
-
274  // Arduino Nano 33 BLE
-
275  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
-
276  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
277  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
278  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
279  #define RADIOLIB_EEPROM_UNSUPPORTED
-
280 
-
281  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
282  #define RADIOLIB_TONE_UNSUPPORTED
-
283  #define RADIOLIB_MBED_TONE_OVERRIDE
+
266 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
+
267  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
+
268  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
269 
+
270 #elif defined(ARDUINO_ARCH_APOLLO3)
+
271  // Sparkfun Apollo3 boards
+
272  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
273  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
+
274  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
275  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
276 
+
277 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
278  // Arduino Nano 33 BLE
+
279  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
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  #define RADIOLIB_EEPROM_UNSUPPORTED
284 
-
285 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
-
286  // Arduino Portenta H7
-
287  #define RADIOLIB_PLATFORM "Portenta H7"
-
288  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
289  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
290  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
291  #define RADIOLIB_EEPROM_UNSUPPORTED
-
292 
-
293  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
294  #define RADIOLIB_TONE_UNSUPPORTED
-
295  #define RADIOLIB_MBED_TONE_OVERRIDE
+
285  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
286  #define RADIOLIB_TONE_UNSUPPORTED
+
287  #define RADIOLIB_MBED_TONE_OVERRIDE
+
288 
+
289 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
290  // Arduino Portenta H7
+
291  #define RADIOLIB_PLATFORM "Portenta H7"
+
292  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
293  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
294  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
295  #define RADIOLIB_EEPROM_UNSUPPORTED
296 
-
297 #elif defined(__STM32F4__) || defined(__STM32F1__)
-
298  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
-
299  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
-
300  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
-
301  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
-
302 
-
303 #elif defined(ARDUINO_ARCH_MEGAAVR)
-
304  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
-
305  #define RADIOLIB_PLATFORM "MegaCoreX"
+
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(__STM32F4__) || defined(__STM32F1__)
+
302  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
303  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
304  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
+
305  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
306 
-
307 #elif defined(ARDUINO_ARCH_MBED_RP2040)
-
308  // Raspberry Pi Pico (official mbed core)
-
309  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
-
310  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
311  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
312  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
313  #define RADIOLIB_EEPROM_UNSUPPORTED
-
314 
-
315  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
316  #define RADIOLIB_TONE_UNSUPPORTED
-
317  #define RADIOLIB_MBED_TONE_OVERRIDE
+
307 #elif defined(ARDUINO_ARCH_MEGAAVR)
+
308  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
309  #define RADIOLIB_PLATFORM "MegaCoreX"
+
310 
+
311 #elif defined(ARDUINO_ARCH_MBED_RP2040)
+
312  // Raspberry Pi Pico (official mbed core)
+
313  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
314  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
315  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
316  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
317  #define RADIOLIB_EEPROM_UNSUPPORTED
318 
-
319 #elif defined(ARDUINO_ARCH_RP2040)
-
320  // Raspberry Pi Pico (unofficial core)
-
321  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
-
322  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
323  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
324  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
325 
-
326 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
-
327  // CubeCell
-
328  #define RADIOLIB_PLATFORM "CubeCell"
-
329  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
-
330  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
-
331  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
-
332 
-
333  // provide an easy access to the on-board module
-
334  #include "board-config.h"
-
335  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
+
319  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
320  #define RADIOLIB_TONE_UNSUPPORTED
+
321  #define RADIOLIB_MBED_TONE_OVERRIDE
+
322 
+
323 #elif defined(ARDUINO_ARCH_RP2040)
+
324  // Raspberry Pi Pico (unofficial core)
+
325  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
+
326  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
327  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
328  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
329 
+
330 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
+
331  // CubeCell
+
332  #define RADIOLIB_PLATFORM "CubeCell"
+
333  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
+
334  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
+
335  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
336 
-
337  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
338  #define nullptr NULL
-
339 
-
340  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
341  #undef pinMode
-
342 
-
343  // ... and uses an outdated GCC which does not support type aliases
-
344  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
-
345 
-
346  // ... and it also has no tone(). This platform was designed by an idiot.
-
347  #define RADIOLIB_TONE_UNSUPPORTED
-
348 
-
349  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
-
350  #define RADIOLIB_YIELD_UNSUPPORTED
-
351  #if defined(yield)
-
352  #undef yield
-
353  #endif
-
354 
-
355 #elif defined(RASPI)
-
356  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
-
357  #define RADIOLIB_PLATFORM "RasPiArduino"
+
337  // provide an easy access to the on-board module
+
338  #include "board-config.h"
+
339  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
+
340 
+
341  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
342  #define nullptr NULL
+
343 
+
344  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
345  #undef pinMode
+
346 
+
347  // ... and uses an outdated GCC which does not support type aliases
+
348  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
349 
+
350  // ... and it also has no tone(). This platform was designed by an idiot.
+
351  #define RADIOLIB_TONE_UNSUPPORTED
+
352 
+
353  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
+
354  #define RADIOLIB_YIELD_UNSUPPORTED
+
355  #if defined(yield)
+
356  #undef yield
+
357  #endif
358 
-
359  // let's start off easy - no tone on this platform, that can happen
-
360  #define RADIOLIB_TONE_UNSUPPORTED
-
361 
-
362  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
-
363  #define RADIOLIB_YIELD_UNSUPPORTED
-
364 
-
365  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
-
366  #define PGM_P const char *
-
367 
-
368  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
-
369  #if defined(millis)
-
370  #undef millis
-
371  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
-
372  #endif
-
373 
-
374  #if defined(micros)
-
375  #undef micros
-
376  inline unsigned long micros() { return((unsigned long)(STCV)); };
-
377  #endif
-
378 
-
379 #elif defined(TEENSYDUINO)
-
380  // Teensy
-
381  #define RADIOLIB_PLATFORM "Teensy"
+
359 #elif defined(RASPI)
+
360  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
+
361  #define RADIOLIB_PLATFORM "RasPiArduino"
+
362 
+
363  // let's start off easy - no tone on this platform, that can happen
+
364  #define RADIOLIB_TONE_UNSUPPORTED
+
365 
+
366  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
+
367  #define RADIOLIB_YIELD_UNSUPPORTED
+
368 
+
369  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
+
370  #define PGM_P const char *
+
371 
+
372  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
+
373  #if defined(millis)
+
374  #undef millis
+
375  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
+
376  #endif
+
377 
+
378  #if defined(micros)
+
379  #undef micros
+
380  inline unsigned long micros() { return((unsigned long)(STCV)); };
+
381  #endif
382 
-
383 #elif defined(ARDUINO_ARCH_RENESAS)
-
384  // Arduino Renesas (UNO R4)
-
385  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
-
386  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
387  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
388  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
389 
-
390 #else
-
391  // other Arduino platforms not covered by the above list - this may or may not work
-
392  #define RADIOLIB_PLATFORM "Unknown Arduino"
-
393  #define RADIOLIB_UNKNOWN_PLATFORM
-
394 
-
395 #endif
-
396 
-
397  // set the default values for all macros
-
398  // these will be applied if they were not defined above
-
399  #if !defined(RADIOLIB_NC)
-
400  #define RADIOLIB_NC (0xFFFFFFFF)
-
401  #endif
-
402 
-
403  #if !defined(RADIOLIB_DEFAULT_SPI)
-
404  #define RADIOLIB_DEFAULT_SPI SPI
+
383 #elif defined(TEENSYDUINO)
+
384  // Teensy
+
385  #define RADIOLIB_PLATFORM "Teensy"
+
386 
+
387 #elif defined(ARDUINO_ARCH_RENESAS)
+
388  // Arduino Renesas (UNO R4)
+
389  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
+
390  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
391  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
392  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
393 
+
394 #else
+
395  // other Arduino platforms not covered by the above list - this may or may not work
+
396  #define RADIOLIB_PLATFORM "Unknown Arduino"
+
397  #define RADIOLIB_UNKNOWN_PLATFORM
+
398 
+
399 #endif
+
400 
+
401  // set the default values for all macros
+
402  // these will be applied if they were not defined above
+
403  #if !defined(RADIOLIB_NC)
+
404  #define RADIOLIB_NC (0xFFFFFFFF)
405  #endif
406 
-
407  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
-
408  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
407  #if !defined(RADIOLIB_DEFAULT_SPI)
+
408  #define RADIOLIB_DEFAULT_SPI SPI
409  #endif
410 
-
411  #if !defined(RADIOLIB_NONVOLATILE)
-
412  #define RADIOLIB_NONVOLATILE PROGMEM
+
411  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
+
412  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
413  #endif
414 
-
415  #if !defined(RADIOLIB_NONVOLATILE_PTR)
-
416  #define RADIOLIB_NONVOLATILE_PTR PGM_P
+
415  #if !defined(RADIOLIB_NONVOLATILE)
+
416  #define RADIOLIB_NONVOLATILE PROGMEM
417  #endif
418 
-
419  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
-
420  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
419  #if !defined(RADIOLIB_NONVOLATILE_PTR)
+
420  #define RADIOLIB_NONVOLATILE_PTR PGM_P
421  #endif
422 
-
423  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
-
424  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
+
423  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
+
424  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
425  #endif
426 
-
427  #if !defined(RADIOLIB_TYPE_ALIAS)
-
428  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
427  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
+
428  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
429  #endif
430 
-
431  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
-
432  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
+
431  #if !defined(RADIOLIB_TYPE_ALIAS)
+
432  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
433  #endif
434 
-
435  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
-
436  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
+
435  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
+
436  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
437  #endif
438 
-
439  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
-
440  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
439  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
+
440  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
441  #endif
442 
-
443 #else
-
444  // generic non-Arduino platform
-
445  #define RADIOLIB_PLATFORM "Generic"
+
443  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
+
444  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
445  #endif
446 
-
447  #define RADIOLIB_NC (0xFF)
-
448  #define RADIOLIB_NONVOLATILE
-
449  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
-
450  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
-
451  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
452 
-
453  #if !defined(RADIOLIB_DEBUG_PORT)
-
454  #define RADIOLIB_DEBUG_PORT stdout
-
455  #endif
+
447 #else
+
448  // generic non-Arduino platform
+
449  #define RADIOLIB_PLATFORM "Generic"
+
450 
+
451  #define RADIOLIB_NC (0xFF)
+
452  #define RADIOLIB_NONVOLATILE
+
453  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
+
454  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
+
455  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
456 
-
457  #define DEC 10
-
458  #define HEX 16
-
459  #define OCT 8
-
460  #define BIN 2
-
461 
-
462  #include <stdint.h>
-
463 
-
464 #endif
+
457  #if !defined(RADIOLIB_DEBUG_PORT)
+
458  #define RADIOLIB_DEBUG_PORT stdout
+
459  #endif
+
460 
+
461  #define DEC 10
+
462  #define HEX 16
+
463  #define OCT 8
+
464  #define BIN 2
465 
-
466 // This only compiles on STM32 boards with SUBGHZ module, but also
-
467 // include when generating docs
-
468 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
-
469  #define RADIOLIB_EXCLUDE_STM32WLX (1)
-
470 #endif
-
471 
-
472 #if RADIOLIB_DEBUG
-
473  #if defined(RADIOLIB_BUILD_ARDUINO)
-
474  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
-
475  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
-
476 
-
477  // some platforms do not support printf("%f"), so it has to be done this way
-
478  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
-
479  #else
-
480  #if !defined(RADIOLIB_DEBUG_PRINT)
-
481  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
-
482  #endif
-
483  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
484  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
-
485  #endif
-
486  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PRINT("%.3f", VAL)
-
487  #endif
-
488  #define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)
-
489 #else
-
490  #define RADIOLIB_DEBUG_PRINT(...) {}
-
491  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
492  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
-
493  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
-
494 #endif
-
495 
-
496 #if RADIOLIB_VERBOSE
-
497  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
-
498  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
-
499 #else
-
500  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
501  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
502 #endif
+
466  #include <stdint.h>
+
467 
+
468 #endif
+
469 
+
470 // This only compiles on STM32 boards with SUBGHZ module, but also
+
471 // include when generating docs
+
472 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
+
473  #define RADIOLIB_EXCLUDE_STM32WLX (1)
+
474 #endif
+
475 
+
476 // set the global debug mode flag
+
477 #if RADIOLIB_DEBUG_BASIC || RADIOLIB_DEBUG_PROTOCOL || RADIOLIB_DEBUG_SPI
+
478  #define RADIOLIB_DEBUG (1)
+
479 #else
+
480  #define RADIOLIB_DEBUG (0)
+
481 #endif
+
482 
+
483 #if RADIOLIB_DEBUG
+
484  #if defined(RADIOLIB_BUILD_ARDUINO)
+
485  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
+
486  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
+
487  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M, ##__VA_ARGS__)
+
488  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M "\n", ##__VA_ARGS__)
+
489 
+
490  // some platforms do not support printf("%f"), so it has to be done this way
+
491  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL); RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
+
492  #else
+
493  #if !defined(RADIOLIB_DEBUG_PRINT)
+
494  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
+
495  #define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M, ##__VA_ARGS__)
+
496  #endif
+
497  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
498  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
499  #define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M "\n", ##__VA_ARGS__)
+
500  #endif
+
501  #define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL "%.3f", VAL)
+
502  #endif
503 
-
507 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
-
508 
-
512 #if RADIOLIB_CHECK_PARAMS
-
513  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
514 #else
-
515  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
516 #endif
-
517 
-
518 #if RADIOLIB_FIX_ERRATA_SX127X
-
519  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
520 #else
-
521  #define RADIOLIB_ERRATA_SX127X(...) {}
-
522 #endif
-
523 
-
524 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
-
525 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
-
526 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
-
527 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
-
528 
-
529 // version definitions
-
530 #define RADIOLIB_VERSION_MAJOR 6
-
531 #define RADIOLIB_VERSION_MINOR 4
-
532 #define RADIOLIB_VERSION_PATCH 2
-
533 #define RADIOLIB_VERSION_EXTRA 0
-
534 
-
535 #define RADIOLIB_VERSION (((RADIOLIB_VERSION_MAJOR) << 24) | ((RADIOLIB_VERSION_MINOR) << 16) | ((RADIOLIB_VERSION_PATCH) << 8) | (RADIOLIB_VERSION_EXTRA))
-
536 
-
537 #endif
+
504  #define RADIOLIB_DEBUG_HEXDUMP(LEVEL, ...) RADIOLIB_DEBUG_PRINT(LEVEL); Module::hexdump(__VA_ARGS__)
+
505 #else
+
506  #define RADIOLIB_DEBUG_PRINT(...) {}
+
507  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
508  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
+
509  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
+
510 #endif
+
511 
+
512 #if RADIOLIB_DEBUG_BASIC
+
513  #define RADIOLIB_DEBUG_BASIC_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_DBG: ", __VA_ARGS__)
+
514  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
+
515  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_DBG: ", __VA_ARGS__)
+
516  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_DBG: ", __VA_ARGS__);
+
517  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_DBG: ", __VA_ARGS__);
+
518 #else
+
519  #define RADIOLIB_DEBUG_BASIC_PRINT(...) {}
+
520  #define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) {}
+
521  #define RADIOLIB_DEBUG_BASIC_PRINTLN(...) {}
+
522  #define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) {}
+
523  #define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) {}
+
524 #endif
+
525 
+
526 #if RADIOLIB_DEBUG_PROTOCOL
+
527  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_PRO: ", __VA_ARGS__)
+
528  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_PRO: ", __VA_ARGS__)
+
529  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_PRO: ", __VA_ARGS__);
+
530  #define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_PRO: ", __VA_ARGS__);
+
531 #else
+
532  #define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) {}
+
533  #define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) {}
+
534  #define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) {}
+
535  #define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) {}
+
536 #endif
+
537 
+
538 #if RADIOLIB_DEBUG_SPI
+
539  #define RADIOLIB_DEBUG_SPI_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_SPI: ", __VA_ARGS__)
+
540  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
+
541  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_SPI: ", __VA_ARGS__)
+
542  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) RADIOLIB_DEBUG_PRINTLN_LVL("", __VA_ARGS__)
+
543  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_SPI: ", __VA_ARGS__);
+
544  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_SPI: ", __VA_ARGS__);
+
545 #else
+
546  #define RADIOLIB_DEBUG_SPI_PRINT(...) {}
+
547  #define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) {}
+
548  #define RADIOLIB_DEBUG_SPI_PRINTLN(...) {}
+
549  #define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) {}
+
550  #define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) {}
+
551  #define RADIOLIB_DEBUG_SPI_HEXDUMP(...) {}
+
552 #endif
+
553 
+
554 
+
558 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
559 
+
563 #if RADIOLIB_CHECK_PARAMS
+
564  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
565 #else
+
566  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
567 #endif
+
568 
+
569 #if RADIOLIB_FIX_ERRATA_SX127X
+
570  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
571 #else
+
572  #define RADIOLIB_ERRATA_SX127X(...) {}
+
573 #endif
+
574 
+
575 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
+
576 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
+
577 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
+
578 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
579 
+
580 // version definitions
+
581 #define RADIOLIB_VERSION_MAJOR 6
+
582 #define RADIOLIB_VERSION_MINOR 4
+
583 #define RADIOLIB_VERSION_PATCH 2
+
584 #define RADIOLIB_VERSION_EXTRA 0
+
585 
+
586 #define RADIOLIB_VERSION (((RADIOLIB_VERSION_MAJOR) << 24) | ((RADIOLIB_VERSION_MINOR) << 16) | ((RADIOLIB_VERSION_PATCH) << 8) | (RADIOLIB_VERSION_EXTRA))
+
587 
+
588 #endif
diff --git a/_build_opt_user_8h_source.html b/_build_opt_user_8h_source.html index 6b76b57e..5766cf18 100644 --- a/_build_opt_user_8h_source.html +++ b/_build_opt_user_8h_source.html @@ -93,10 +93,11 @@ $(document).ready(function(){initNavTree('_build_opt_user_8h_source.html',''); i
5 // most commonly, RADIOLIB_EXCLUDE_* macros
6 // or enabling debug output
7 
-
8 //#define RADIOLIB_DEBUG (1)
-
9 //#define RADIOLIB_VERBOSE (1)
-
10 
-
11 #endif
+
8 //#define RADIOLIB_DEBUG_BASIC (1) // basic debugging (e.g. reporting GPIO timeouts or module not being found)
+
9 //#define RADIOLIB_DEBUG_PROTOCOL (1) // protocol information (e.g. LoRaWAN internal information)
+
10 //#define RADIOLIB_DEBUG_SPI (1) // verbose transcription of all SPI communication - produces large debug logs!
+
11 
+
12 #endif
diff --git a/_c_c1101_8h_source.html b/_c_c1101_8h_source.html index 969d1672..09521381 100644 --- a/_c_c1101_8h_source.html +++ b/_c_c1101_8h_source.html @@ -791,14 +791,14 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html',''); initResi
988 
989 #endif
CC1101
Control class for CC1101 module.
Definition: CC1101.h:530
-
CC1101::setDIOMapping
int16_t setDIOMapping(uint32_t pin, uint32_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: CC1101.cpp:950
+
CC1101::setDIOMapping
int16_t setDIOMapping(uint32_t pin, uint32_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: CC1101.cpp:949
CC1101::setPromiscuousMode
int16_t setPromiscuousMode(bool enable=true)
Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address,...
Definition: CC1101.cpp:829
CC1101::setFrequencyDeviation
int16_t setFrequencyDeviation(float freqDev) override
Sets frequency deviation. Allowed values range from 1.587 to 380.8 kHz.
Definition: CC1101.cpp:492
CC1101::getPacketLength
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: CC1101.cpp:767
CC1101::reset
void reset()
Reset method - resets the chip using manual reset sequence (without RESET pin).
Definition: CC1101.cpp:90
-
CC1101::readBit
void readBit(uint32_t pin)
Function to read and process data bit in direct reception mode.
Definition: CC1101.cpp:945
+
CC1101::readBit
void readBit(uint32_t pin)
Function to read and process data bit in direct reception mode.
Definition: CC1101.cpp:944
CC1101::transmitDirect
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: CC1101.cpp:194
-
CC1101::getChipVersion
int16_t getChipVersion()
Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14...
Definition: CC1101.cpp:936
+
CC1101::getChipVersion
int16_t getChipVersion()
Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14...
Definition: CC1101.cpp:935
CC1101::readData
virtual int16_t readData(uint8_t *data, size_t len)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:209
CC1101::setRxBandwidth
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values are 58, 68, 81, 102, 116, 135, 162, 203, 232,...
Definition: CC1101.cpp:471
CC1101::packetMode
int16_t packetMode()
Stops direct mode. It is required to call this method to switch from direct transmissions to packet-b...
Definition: CC1101.cpp:246
@@ -809,7 +809,7 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html',''); initResi
CC1101::setPacketReceivedAction
void setPacketReceivedAction(void(*func)(void))
Sets interrupt service routine to call when a packet is received.
Definition: CC1101.cpp:261
CC1101::setOutputPower
int16_t setOutputPower(int8_t pwr)
Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm.
Definition: CC1101.cpp:544
CC1101::variablePacketLengthMode
int16_t variablePacketLengthMode(uint8_t maxLen=RADIOLIB_CC1101_MAX_PACKET_LENGTH)
Set modem in variable packet length mode.
Definition: CC1101.cpp:791
-
CC1101::setDirectAction
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: CC1101.cpp:941
+
CC1101::setDirectAction
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: CC1101.cpp:940
CC1101::getLQI
uint8_t getLQI() const
Gets LQI (Link Quality Indicator) of the last received packet.
Definition: CC1101.cpp:763
CC1101::setRfSwitchPins
void setRfSwitchPins(uint32_t rxEn, uint32_t txEn)
Some modules contain external RF switch controlled by pins. This function gives RadioLib control over...
Definition: CC1101.cpp:908
CC1101::setCrcFiltering
int16_t setCrcFiltering(bool enable=true)
Enable CRC filtering and generation.
Definition: CC1101.cpp:819
diff --git a/_module_8h_source.html b/_module_8h_source.html index 06d18d9e..4403eb9c 100644 --- a/_module_8h_source.html +++ b/_module_8h_source.html @@ -258,11 +258,11 @@ $(document).ready(function(){initNavTree('_module_8h_source.html',''); initResiz
Module::hal
RadioLibHal * hal
Hardware abstraction layer to be used.
Definition: Module.h:122
Module::term
void term()
Terminate low-level module control.
Definition: Module.cpp:53
Module::SPInopCommand
uint8_t SPInopCommand
Basic SPI no-operation command. Defaults to 0x00.
Definition: Module.h:137
-
Module::waitForMicroseconds
void waitForMicroseconds(uint32_t start, uint32_t len)
Wait for time to elapse, either using the microsecond timer, or the TimerFlag. Note that in interrupt...
Definition: Module.cpp:380
-
Module::reflect
static uint32_t reflect(uint32_t in, uint8_t bits)
Function to reflect bits within a byte.
Definition: Module.cpp:398
+
Module::waitForMicroseconds
void waitForMicroseconds(uint32_t start, uint32_t len)
Wait for time to elapse, either using the microsecond timer, or the TimerFlag. Note that in interrupt...
Definition: Module.cpp:383
+
Module::reflect
static uint32_t reflect(uint32_t in, uint8_t bits)
Function to reflect bits within a byte.
Definition: Module.cpp:401
Module::operator=
Module & operator=(const Module &mod)
Overload for assignment operator.
Definition: Module.cpp:33
Module::getGpio
uint32_t getGpio() const
Access method to get the pin number of second interrupt/GPIO.
Definition: Module.h:355
-
Module::findRfSwitchMode
const RfSwitchMode_t * findRfSwitchMode(uint8_t mode) const
Find a mode in the RfSwitchTable.
Definition: Module.cpp:515
+
Module::findRfSwitchMode
const RfSwitchMode_t * findRfSwitchMode(uint8_t mode) const
Find a mode in the RfSwitchTable.
Definition: Module.cpp:518
Module::OpMode_t
OpMode_t
Definition: Module.h:61
Module::MODE_TX
@ MODE_TX
Definition: Module.h:71
Module::MODE_IDLE
@ MODE_IDLE
Definition: Module.h:67
@@ -272,7 +272,7 @@ $(document).ready(function(){initNavTree('_module_8h_source.html',''); initResiz
Module::SPIstreamError
int16_t SPIstreamError
The last recorded SPI stream error.
Definition: Module.h:158
Module::SPIwriteStream
int16_t SPIwriteStream(uint8_t cmd, uint8_t *data, size_t numBytes, bool waitForGpio=true, bool verify=true)
Method to perform a write transaction with SPI stream.
Definition: Module.cpp:223
Module::SPItransfer
void SPItransfer(uint8_t cmd, uint16_t reg, uint8_t *dataOut, uint8_t *dataIn, size_t numBytes)
SPI single transfer method.
Definition: Module.cpp:145
-
Module::setRfSwitchPins
void setRfSwitchPins(uint32_t rxEn, uint32_t txEn)
Some modules contain external RF switch controlled by pins. This function gives RadioLib control over...
Definition: Module.cpp:492
+
Module::setRfSwitchPins
void setRfSwitchPins(uint32_t rxEn, uint32_t txEn)
Some modules contain external RF switch controlled by pins. This function gives RadioLib control over...
Definition: Module.cpp:495
Module::Module
Module(RadioLibHal *hal, uint32_t cs, uint32_t irq, uint32_t rst, uint32_t gpio=RADIOLIB_NC)
Module constructor.
Definition: Module.cpp:25
Module::SPIreadCommand
uint8_t SPIreadCommand
Basic SPI read command. Defaults to 0x00.
Definition: Module.h:127
Module::SPIreadRegisterBurst
void SPIreadRegisterBurst(uint16_t reg, size_t numBytes, uint8_t *inBytes)
SPI burst read method.
Definition: Module.cpp:107
@@ -282,14 +282,14 @@ $(document).ready(function(){initNavTree('_module_8h_source.html',''); initResiz
Module::getIrq
uint32_t getIrq() const
Access method to get the pin number of interrupt/GPIO.
Definition: Module.h:343
Module::SPIreadStream
int16_t SPIreadStream(uint8_t cmd, uint8_t *data, size_t numBytes, bool waitForGpio=true, bool verify=true)
Method to perform a read transaction with SPI stream.
Definition: Module.cpp:206
Module::SPIaddrWidth
uint8_t SPIaddrWidth
SPI address width. Defaults to 8, currently only supports 8 and 16-bit addresses.
Definition: Module.h:147
-
Module::setRfSwitchTable
void setRfSwitchTable(const uint32_t(&pins)[RFSWITCH_MAX_PINS], const RfSwitchMode_t table[])
Some modules contain external RF switch controlled by pins. This function gives RadioLib control over...
Definition: Module.cpp:508
+
Module::setRfSwitchTable
void setRfSwitchTable(const uint32_t(&pins)[RFSWITCH_MAX_PINS], const RfSwitchMode_t table[])
Some modules contain external RF switch controlled by pins. This function gives RadioLib control over...
Definition: Module.cpp:511
Module::SPItransferStream
int16_t SPItransferStream(uint8_t *cmd, uint8_t cmdLen, bool write, uint8_t *dataOut, uint8_t *dataIn, size_t numBytes, bool waitForGpio, uint32_t timeout)
SPI single transfer method for modules with stream-type SPI interface (SX126x, SX128x etc....
Definition: Module.cpp:259
Module::init
void init()
Initialize low-level module control.
Definition: Module.cpp:43
Module::getRst
uint32_t getRst() const
Access method to get the pin number of hardware reset pin.
Definition: Module.h:349
Module::SPIwriteCommand
uint8_t SPIwriteCommand
Basic SPI write command. Defaults to 0x80.
Definition: Module.h:132
Module::SPIwriteRegisterBurst
void SPIwriteRegisterBurst(uint16_t reg, uint8_t *data, size_t numBytes)
SPI burst write method.
Definition: Module.cpp:127
Module::SPIparseStatusCb
SPIparseStatusCb_t SPIparseStatusCb
Callback to function that will parse the module-specific status codes to RadioLib status codes....
Definition: Module.h:169
-
Module::setRfSwitchState
void setRfSwitchState(uint8_t mode)
Set RF switch state.
Definition: Module.cpp:525
+
Module::setRfSwitchState
void setRfSwitchState(uint8_t mode)
Set RF switch state.
Definition: Module.cpp:528
RadioLibHal
Hardware abstraction library base interface.
Definition: Hal.h:95
RADIOLIB_ERR_UNKNOWN
#define RADIOLIB_ERR_UNKNOWN
There was an unexpected, unknown error. If you see this, something went incredibly wrong....
Definition: TypeDef.h:110
Module::RfSwitchMode_t
Definition: Module.h:49