diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index ce629339..a7ef5dc0 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -171,446 +171,450 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
83  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
84  #define RADIOLIB_PLATFORM "Arduino AVR"
85 
-
86 #elif defined(ESP8266)
-
87  // ESP8266 boards
-
88  #define RADIOLIB_PLATFORM "ESP8266"
+
86  #if !(defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
+
87  #define RADIOLIB_LOWEND_PLATFORM
+
88  #endif
89 
-
90 #elif defined(ESP32) || defined(ARDUINO_ARCH_ESP32)
-
91  #define RADIOLIB_ESP32
-
92 
-
93  // ESP32 boards
-
94  #define RADIOLIB_PLATFORM "ESP32"
-
95 
-
96  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
-
97  #define RADIOLIB_TONE_UNSUPPORTED
-
98  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
-
99 
-
100 #elif defined(ARDUINO_ARCH_STM32)
-
101  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
-
102  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
+
90 #elif defined(ESP8266)
+
91  // ESP8266 boards
+
92  #define RADIOLIB_PLATFORM "ESP8266"
+
93 
+
94 #elif defined(ESP32) || defined(ARDUINO_ARCH_ESP32)
+
95  #define RADIOLIB_ESP32
+
96 
+
97  // ESP32 boards
+
98  #define RADIOLIB_PLATFORM "ESP32"
+
99 
+
100  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
+
101  #define RADIOLIB_TONE_UNSUPPORTED
+
102  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
103 
-
104 #elif defined(SAMD_SERIES)
-
105  // Adafruit SAMD boards (M0 and M4)
-
106  #define RADIOLIB_PLATFORM "Adafruit SAMD"
-
107  #define RADIOLIB_EEPROM_UNSUPPORTED
-
108 
-
109 #elif defined(ARDUINO_ARCH_SAMD)
-
110  // Arduino SAMD (Zero, MKR, etc.)
-
111  #define RADIOLIB_PLATFORM "Arduino SAMD"
-
112  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
113  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
114  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
115  #define RADIOLIB_EEPROM_UNSUPPORTED
-
116 
-
117 #elif defined(__SAM3X8E__)
-
118  // Arduino Due
-
119  #define RADIOLIB_PLATFORM "Arduino Due"
-
120  #define RADIOLIB_TONE_UNSUPPORTED
-
121  #define RADIOLIB_EEPROM_UNSUPPORTED
-
122 
-
123 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
-
124  // Adafruit nRF52 boards
-
125  #define RADIOLIB_PLATFORM "Adafruit nRF52"
-
126  #define RADIOLIB_EEPROM_UNSUPPORTED
-
127 
-
128 #elif defined(ARDUINO_ARC32_TOOLS)
-
129  // Intel Curie
-
130  #define RADIOLIB_PLATFORM "Intel Curie"
+
104 #elif defined(ARDUINO_ARCH_STM32)
+
105  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
+
106  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
+
107 
+
108 #elif defined(SAMD_SERIES)
+
109  // Adafruit SAMD boards (M0 and M4)
+
110  #define RADIOLIB_PLATFORM "Adafruit SAMD"
+
111  #define RADIOLIB_EEPROM_UNSUPPORTED
+
112 
+
113 #elif defined(ARDUINO_ARCH_SAMD)
+
114  // Arduino SAMD (Zero, MKR, etc.)
+
115  #define RADIOLIB_PLATFORM "Arduino SAMD"
+
116  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
117  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
118  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
119  #define RADIOLIB_EEPROM_UNSUPPORTED
+
120 
+
121 #elif defined(__SAM3X8E__)
+
122  // Arduino Due
+
123  #define RADIOLIB_PLATFORM "Arduino Due"
+
124  #define RADIOLIB_TONE_UNSUPPORTED
+
125  #define RADIOLIB_EEPROM_UNSUPPORTED
+
126 
+
127 #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
+
128  // Adafruit nRF52 boards
+
129  #define RADIOLIB_PLATFORM "Adafruit nRF52"
+
130  #define RADIOLIB_EEPROM_UNSUPPORTED
131 
-
132 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
-
133  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
-
134  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
132 #elif defined(ARDUINO_ARC32_TOOLS)
+
133  // Intel Curie
+
134  #define RADIOLIB_PLATFORM "Intel Curie"
135 
-
136 #elif defined(ARDUINO_ARCH_APOLLO3)
-
137  // Sparkfun Apollo3 boards
-
138  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
-
139  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
-
140  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
141  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
142 
-
143 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
-
144  // Arduino Nano 33 BLE
-
145  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
-
146  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
147  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
148  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
149  #define RADIOLIB_EEPROM_UNSUPPORTED
-
150 
-
151  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
152  #define RADIOLIB_TONE_UNSUPPORTED
-
153  #define RADIOLIB_MBED_TONE_OVERRIDE
+
136 #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(PORTDUINO)
+
137  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
+
138  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
139 
+
140 #elif defined(ARDUINO_ARCH_APOLLO3)
+
141  // Sparkfun Apollo3 boards
+
142  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
143  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (Arduino_PinMode)
+
144  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
145  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
146 
+
147 #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
148  // Arduino Nano 33 BLE
+
149  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
150  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
151  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
152  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
153  #define RADIOLIB_EEPROM_UNSUPPORTED
154 
-
155 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
-
156  // Arduino Portenta H7
-
157  #define RADIOLIB_PLATFORM "Portenta H7"
-
158  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
159  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
160  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
161  #define RADIOLIB_EEPROM_UNSUPPORTED
-
162 
-
163  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
164  #define RADIOLIB_TONE_UNSUPPORTED
-
165  #define RADIOLIB_MBED_TONE_OVERRIDE
+
155  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
156  #define RADIOLIB_TONE_UNSUPPORTED
+
157  #define RADIOLIB_MBED_TONE_OVERRIDE
+
158 
+
159 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
160  // Arduino Portenta H7
+
161  #define RADIOLIB_PLATFORM "Portenta H7"
+
162  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
163  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
164  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
165  #define RADIOLIB_EEPROM_UNSUPPORTED
166 
-
167 #elif defined(__STM32F4__) || defined(__STM32F1__)
-
168  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
-
169  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
-
170  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
-
171  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
-
172 
-
173 #elif defined(ARDUINO_ARCH_MEGAAVR)
-
174  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
-
175  #define RADIOLIB_PLATFORM "MegaCoreX"
+
167  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
168  #define RADIOLIB_TONE_UNSUPPORTED
+
169  #define RADIOLIB_MBED_TONE_OVERRIDE
+
170 
+
171 #elif defined(__STM32F4__) || defined(__STM32F1__)
+
172  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
173  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
174  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (WiringPinMode)
+
175  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (ExtIntTriggerMode)
176 
-
177 #elif defined(ARDUINO_ARCH_MBED_RP2040)
-
178  // Raspberry Pi Pico (official mbed core)
-
179  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
-
180  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
181  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
182  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
183  #define RADIOLIB_EEPROM_UNSUPPORTED
-
184 
-
185  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
186  #define RADIOLIB_TONE_UNSUPPORTED
-
187  #define RADIOLIB_MBED_TONE_OVERRIDE
+
177 #elif defined(ARDUINO_ARCH_MEGAAVR)
+
178  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
179  #define RADIOLIB_PLATFORM "MegaCoreX"
+
180 
+
181 #elif defined(ARDUINO_ARCH_MBED_RP2040)
+
182  // Raspberry Pi Pico (official mbed core)
+
183  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
184  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
185  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
186  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
187  #define RADIOLIB_EEPROM_UNSUPPORTED
188 
-
189 #elif defined(ARDUINO_ARCH_RP2040)
-
190  // Raspberry Pi Pico (unofficial core)
-
191  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
-
192  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
193  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
194  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
195 
-
196 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
-
197  // CubeCell
-
198  #define RADIOLIB_PLATFORM "CubeCell"
-
199  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
-
200  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
-
201  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
-
202 
-
203  // provide an easy access to the on-board module
-
204  #include "board-config.h"
-
205  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
+
189  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
190  #define RADIOLIB_TONE_UNSUPPORTED
+
191  #define RADIOLIB_MBED_TONE_OVERRIDE
+
192 
+
193 #elif defined(ARDUINO_ARCH_RP2040)
+
194  // Raspberry Pi Pico (unofficial core)
+
195  #define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
+
196  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
197  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
198  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
199 
+
200 #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
+
201  // CubeCell
+
202  #define RADIOLIB_PLATFORM "CubeCell"
+
203  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(1000000, MSBFIRST, SPI_MODE0) // see issue #709
+
204  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
+
205  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
206 
-
207  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
208  #define nullptr NULL
-
209 
-
210  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
211  #undef pinMode
-
212 
-
213  // ... and uses an outdated GCC which does not support type aliases
-
214  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
-
215 
-
216  // ... and it also has no tone(). This platform was designed by an idiot.
-
217  #define RADIOLIB_TONE_UNSUPPORTED
-
218 
-
219  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
-
220  #define RADIOLIB_YIELD_UNSUPPORTED
-
221  #if defined(yield)
-
222  #undef yield
-
223  #endif
-
224 
-
225 #elif defined(RASPI)
-
226  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
-
227  #define RADIOLIB_PLATFORM "RasPiArduino"
+
207  // provide an easy access to the on-board module
+
208  #include "board-config.h"
+
209  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
+
210 
+
211  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
212  #define nullptr NULL
+
213 
+
214  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
215  #undef pinMode
+
216 
+
217  // ... and uses an outdated GCC which does not support type aliases
+
218  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
219 
+
220  // ... and it also has no tone(). This platform was designed by an idiot.
+
221  #define RADIOLIB_TONE_UNSUPPORTED
+
222 
+
223  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
+
224  #define RADIOLIB_YIELD_UNSUPPORTED
+
225  #if defined(yield)
+
226  #undef yield
+
227  #endif
228 
-
229  // let's start off easy - no tone on this platform, that can happen
-
230  #define RADIOLIB_TONE_UNSUPPORTED
-
231 
-
232  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
-
233  #define RADIOLIB_YIELD_UNSUPPORTED
-
234 
-
235  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
-
236  #define PGM_P const char *
-
237 
-
238  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
-
239  #if defined(millis)
-
240  #undef millis
-
241  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
-
242  #endif
-
243 
-
244  #if defined(micros)
-
245  #undef micros
-
246  inline unsigned long micros() { return((unsigned long)(STCV)); };
-
247  #endif
-
248 
-
249 #elif defined(TEENSYDUINO)
-
250  // Teensy
-
251  #define RADIOLIB_PLATFORM "Teensy"
+
229 #elif defined(RASPI)
+
230  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
+
231  #define RADIOLIB_PLATFORM "RasPiArduino"
+
232 
+
233  // let's start off easy - no tone on this platform, that can happen
+
234  #define RADIOLIB_TONE_UNSUPPORTED
+
235 
+
236  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
+
237  #define RADIOLIB_YIELD_UNSUPPORTED
+
238 
+
239  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
+
240  #define PGM_P const char *
+
241 
+
242  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
+
243  #if defined(millis)
+
244  #undef millis
+
245  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
+
246  #endif
+
247 
+
248  #if defined(micros)
+
249  #undef micros
+
250  inline unsigned long micros() { return((unsigned long)(STCV)); };
+
251  #endif
252 
-
253 #elif defined(ARDUINO_ARCH_RENESAS)
-
254  // Arduino Renesas (UNO R4)
-
255  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
-
256  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
-
257  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
-
258  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
-
259 
-
260 #else
-
261  // other Arduino platforms not covered by the above list - this may or may not work
-
262  #define RADIOLIB_PLATFORM "Unknown Arduino"
-
263  #define RADIOLIB_UNKNOWN_PLATFORM
-
264 
-
265 #endif
-
266 
-
267  // set the default values for all macros
-
268  // these will be applied if they were not defined above
-
269  #if !defined(RADIOLIB_NC)
-
270  #define RADIOLIB_NC (0xFFFFFFFF)
-
271  #endif
-
272 
-
273  #if !defined(RADIOLIB_DEFAULT_SPI)
-
274  #define RADIOLIB_DEFAULT_SPI SPI
+
253 #elif defined(TEENSYDUINO)
+
254  // Teensy
+
255  #define RADIOLIB_PLATFORM "Teensy"
+
256 
+
257 #elif defined(ARDUINO_ARCH_RENESAS)
+
258  // Arduino Renesas (UNO R4)
+
259  #define RADIOLIB_PLATFORM "Arduino Renesas (UNO R4)"
+
260  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PinMode)
+
261  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST (PinStatus)
+
262  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (PinStatus)
+
263 
+
264 #else
+
265  // other Arduino platforms not covered by the above list - this may or may not work
+
266  #define RADIOLIB_PLATFORM "Unknown Arduino"
+
267  #define RADIOLIB_UNKNOWN_PLATFORM
+
268 
+
269 #endif
+
270 
+
271  // set the default values for all macros
+
272  // these will be applied if they were not defined above
+
273  #if !defined(RADIOLIB_NC)
+
274  #define RADIOLIB_NC (0xFFFFFFFF)
275  #endif
276 
-
277  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
-
278  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
277  #if !defined(RADIOLIB_DEFAULT_SPI)
+
278  #define RADIOLIB_DEFAULT_SPI SPI
279  #endif
280 
-
281  #if !defined(RADIOLIB_NONVOLATILE)
-
282  #define RADIOLIB_NONVOLATILE PROGMEM
+
281  #if !defined(RADIOLIB_DEFAULT_SPI_SETTINGS)
+
282  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
283  #endif
284 
-
285  #if !defined(RADIOLIB_NONVOLATILE_PTR)
-
286  #define RADIOLIB_NONVOLATILE_PTR PGM_P
+
285  #if !defined(RADIOLIB_NONVOLATILE)
+
286  #define RADIOLIB_NONVOLATILE PROGMEM
287  #endif
288 
-
289  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
-
290  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
289  #if !defined(RADIOLIB_NONVOLATILE_PTR)
+
290  #define RADIOLIB_NONVOLATILE_PTR PGM_P
291  #endif
292 
-
293  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
-
294  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
+
293  #if !defined(RADIOLIB_NONVOLATILE_READ_BYTE)
+
294  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
295  #endif
296 
-
297  #if !defined(RADIOLIB_TYPE_ALIAS)
-
298  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
297  #if !defined(RADIOLIB_NONVOLATILE_READ_DWORD)
+
298  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) pgm_read_dword(addr)
299  #endif
300 
-
301  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
-
302  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
+
301  #if !defined(RADIOLIB_TYPE_ALIAS)
+
302  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
303  #endif
304 
-
305  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
-
306  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
+
305  #if !defined(RADIOLIB_ARDUINOHAL_PIN_MODE_CAST)
+
306  #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST
307  #endif
308 
-
309  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
-
310  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
309  #if !defined(RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST)
+
310  #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST
311  #endif
312 
-
313 #else
-
314  // generic non-Arduino platform
-
315  #define RADIOLIB_PLATFORM "Generic"
+
313  #if !defined(RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST)
+
314  #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST
+
315  #endif
316 
-
317  #define RADIOLIB_NC (0xFF)
-
318  #define RADIOLIB_NONVOLATILE
-
319  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
-
320  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
-
321  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
322 
-
323  #if !defined(RADIOLIB_DEBUG_PORT)
-
324  #define RADIOLIB_DEBUG_PORT stdout
-
325  #endif
+
317 #else
+
318  // generic non-Arduino platform
+
319  #define RADIOLIB_PLATFORM "Generic"
+
320 
+
321  #define RADIOLIB_NC (0xFF)
+
322  #define RADIOLIB_NONVOLATILE
+
323  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
+
324  #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
+
325  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
326 
-
327  #define DEC 10
-
328  #define HEX 16
-
329  #define OCT 8
-
330  #define BIN 2
-
331 
-
332  #include <stdint.h>
-
333 
-
334 #endif
+
327  #if !defined(RADIOLIB_DEBUG_PORT)
+
328  #define RADIOLIB_DEBUG_PORT stdout
+
329  #endif
+
330 
+
331  #define DEC 10
+
332  #define HEX 16
+
333  #define OCT 8
+
334  #define BIN 2
335 
-
336 /*
-
337  * Uncomment to enable debug output.
-
338  * Warning: Debug output will slow down the whole system significantly.
-
339  * Also, it will result in larger compiled binary.
-
340  * Levels: debug - only main info
-
341  * verbose - full transcript of all SPI communication
-
342  */
-
343 #if !defined(RADIOLIB_DEBUG)
-
344  //#define RADIOLIB_DEBUG
-
345 #endif
-
346 #if !defined(RADIOLIB_VERBOSE)
-
347  //#define RADIOLIB_VERBOSE
-
348 #endif
-
349 
-
350 // set which output port should be used for debug output
-
351 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
-
352 #if defined(RADIOLIB_BUILD_ARDUINO) && !defined(RADIOLIB_DEBUG_PORT)
-
353  #define RADIOLIB_DEBUG_PORT Serial
-
354 #endif
-
355 
-
356 /*
-
357  * Uncomment to enable "paranoid" SPI mode
-
358  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
-
359  * This improves reliability, but slightly slows down communication.
-
360  * Note: Enabled by default.
-
361  */
-
362 #if !defined(RADIOLIB_SPI_PARANOID)
-
363  #define RADIOLIB_SPI_PARANOID
-
364 #endif
-
365 
-
366 /*
-
367  * Uncomment to enable parameter range checking
-
368  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
-
369  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
-
370  * possibly leading to bricked module and/or program crashing.
-
371  * Note: Enabled by default.
-
372  */
-
373 #if !defined(RADIOLIB_CHECK_PARAMS)
-
374  #define RADIOLIB_CHECK_PARAMS
-
375 #endif
-
376 
-
377 /*
-
378  * Uncomment to enable SX127x errata fix
-
379  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
-
380  * It should only be enabled if you really are observing some errata-related issue.
-
381  * Note: Disabled by default.
-
382  */
-
383 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
-
384  //#define RADIOLIB_FIX_ERRATA_SX127X
-
385 #endif
-
386 
-
387 /*
-
388  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
-
389  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
-
390  * Failure to heed the above warning may result in bricked module.
-
391  */
-
392 #if !defined(RADIOLIB_GODMODE)
-
393  //#define RADIOLIB_GODMODE
-
394 #endif
-
395 
-
396 /*
-
397  * Uncomment to enable low-level hardware access
-
398  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
-
399  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
-
400  */
-
401 #if !defined(RADIOLIB_LOW_LEVEL)
-
402  //#define RADIOLIB_LOW_LEVEL
-
403 #endif
-
404 
-
405 /*
-
406  * Uncomment to enable pre-defined modules when using RadioShield.
-
407  */
-
408 #if !defined(RADIOLIB_RADIOSHIELD)
-
409  //#define RADIOLIB_RADIOSHIELD
-
410 #endif
-
411 
-
412 /*
-
413  * Uncomment to enable interrupt-based timing control
-
414  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
-
415  */
-
416 #if !defined(RADIOLIB_INTERRUPT_TIMING)
-
417  //#define RADIOLIB_INTERRUPT_TIMING
-
418 #endif
-
419 
-
420 /*
-
421  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
-
422  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
423  */
-
424 #if !defined(RADIOLIB_STATIC_ONLY)
-
425  //#define RADIOLIB_STATIC_ONLY
-
426 #endif
-
427 
-
428 // set the size of static arrays to use
-
429 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
430  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
-
431 #endif
-
432 
-
433 // the base address for persistent storage
-
434 // some protocols (e.g. LoRaWAN) require a method
-
435 // to store some data persistently
-
436 // on Arduino, this will use EEPROM, on non-Arduino platform,
-
437 // it will use anything provided by the hardware abstraction layer
-
438 // RadioLib will place these starting at this address
-
439 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_BASE)
-
440  #define RADIOLIB_HAL_PERSISTENT_STORAGE_BASE (0)
-
441 #endif
-
442 
-
443 // the amount of space allocated to the persistent storage
-
444 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE)
-
445  #define RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE (0x0180)
-
446 #endif
-
447 
-
448 /*
-
449  * Uncomment on boards whose clock runs too slow or too fast
-
450  * Set the value according to the following scheme:
-
451  * Enable timestamps on your terminal
-
452  * Print something to terminal, wait 1000 milliseconds, print something again
-
453  * If the difference is e.g. 1014 milliseconds between the prints, set this value to 14
-
454  * Or, for more accuracy, wait for 100,000 milliseconds and divide the total drift by 100
-
455  */
-
456 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
-
457  //#define RADIOLIB_CLOCK_DRIFT_MS (0)
-
458 #endif
-
459 
-
460 // This only compiles on STM32 boards with SUBGHZ module, but also
-
461 // include when generating docs
-
462 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
-
463  #define RADIOLIB_EXCLUDE_STM32WLX
-
464 #endif
-
465 
-
466 #if defined(RADIOLIB_DEBUG)
-
467  #if defined(RADIOLIB_BUILD_ARDUINO)
-
468  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
-
469  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
-
470 
-
471  // some platforms do not support printf("%f"), so it has to be done this way
-
472  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
-
473  #else
-
474  #if !defined(RADIOLIB_DEBUG_PRINT)
-
475  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
-
476  #endif
-
477  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
478  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
-
479  #endif
-
480  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PRINT("%.3f", VAL)
-
481  #endif
-
482  #define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)
-
483 #else
-
484  #define RADIOLIB_DEBUG_PRINT(...) {}
-
485  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
486  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
-
487  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
-
488 #endif
-
489 
-
490 #if defined(RADIOLIB_VERBOSE)
-
491  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
-
492  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
-
493 #else
-
494  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
495  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
496 #endif
-
497 
-
501 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
-
502 
-
506 #if defined(RADIOLIB_CHECK_PARAMS)
-
507  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
508 #else
-
509  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
510 #endif
-
511 
-
512 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
-
513  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
514 #else
-
515  #define RADIOLIB_ERRATA_SX127X(...) {}
-
516 #endif
-
517 
-
518 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
-
519 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
-
520 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
-
521 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
-
522 
-
523 // version definitions
-
524 #define RADIOLIB_VERSION_MAJOR (0x06)
-
525 #define RADIOLIB_VERSION_MINOR (0x02)
-
526 #define RADIOLIB_VERSION_PATCH (0x00)
-
527 #define RADIOLIB_VERSION_EXTRA (0x00)
-
528 
-
529 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
-
530 
-
531 #endif
+
336  #include <stdint.h>
+
337 
+
338 #endif
+
339 
+
340 /*
+
341  * Uncomment to enable debug output.
+
342  * Warning: Debug output will slow down the whole system significantly.
+
343  * Also, it will result in larger compiled binary.
+
344  * Levels: debug - only main info
+
345  * verbose - full transcript of all SPI communication
+
346  */
+
347 #if !defined(RADIOLIB_DEBUG)
+
348  //#define RADIOLIB_DEBUG
+
349 #endif
+
350 #if !defined(RADIOLIB_VERBOSE)
+
351  //#define RADIOLIB_VERBOSE
+
352 #endif
+
353 
+
354 // set which output port should be used for debug output
+
355 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
+
356 #if defined(RADIOLIB_BUILD_ARDUINO) && !defined(RADIOLIB_DEBUG_PORT)
+
357  #define RADIOLIB_DEBUG_PORT Serial
+
358 #endif
+
359 
+
360 /*
+
361  * Uncomment to enable "paranoid" SPI mode
+
362  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
363  * This improves reliability, but slightly slows down communication.
+
364  * Note: Enabled by default.
+
365  */
+
366 #if !defined(RADIOLIB_SPI_PARANOID)
+
367  #define RADIOLIB_SPI_PARANOID
+
368 #endif
+
369 
+
370 /*
+
371  * Uncomment to enable parameter range checking
+
372  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
373  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
374  * possibly leading to bricked module and/or program crashing.
+
375  * Note: Enabled by default.
+
376  */
+
377 #if !defined(RADIOLIB_CHECK_PARAMS)
+
378  #define RADIOLIB_CHECK_PARAMS
+
379 #endif
+
380 
+
381 /*
+
382  * Uncomment to enable SX127x errata fix
+
383  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
+
384  * It should only be enabled if you really are observing some errata-related issue.
+
385  * Note: Disabled by default.
+
386  */
+
387 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
+
388  //#define RADIOLIB_FIX_ERRATA_SX127X
+
389 #endif
+
390 
+
391 /*
+
392  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
393  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
394  * Failure to heed the above warning may result in bricked module.
+
395  */
+
396 #if !defined(RADIOLIB_GODMODE)
+
397  //#define RADIOLIB_GODMODE
+
398 #endif
+
399 
+
400 /*
+
401  * Uncomment to enable low-level hardware access
+
402  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
+
403  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
404  */
+
405 #if !defined(RADIOLIB_LOW_LEVEL)
+
406  //#define RADIOLIB_LOW_LEVEL
+
407 #endif
+
408 
+
409 /*
+
410  * Uncomment to enable pre-defined modules when using RadioShield.
+
411  */
+
412 #if !defined(RADIOLIB_RADIOSHIELD)
+
413  //#define RADIOLIB_RADIOSHIELD
+
414 #endif
+
415 
+
416 /*
+
417  * Uncomment to enable interrupt-based timing control
+
418  * For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
+
419  */
+
420 #if !defined(RADIOLIB_INTERRUPT_TIMING)
+
421  //#define RADIOLIB_INTERRUPT_TIMING
+
422 #endif
+
423 
+
424 /*
+
425  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
+
426  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
427  */
+
428 #if !defined(RADIOLIB_STATIC_ONLY)
+
429  //#define RADIOLIB_STATIC_ONLY
+
430 #endif
+
431 
+
432 // set the size of static arrays to use
+
433 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
434  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
+
435 #endif
+
436 
+
437 // the base address for persistent storage
+
438 // some protocols (e.g. LoRaWAN) require a method
+
439 // to store some data persistently
+
440 // on Arduino, this will use EEPROM, on non-Arduino platform,
+
441 // it will use anything provided by the hardware abstraction layer
+
442 // RadioLib will place these starting at this address
+
443 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_BASE)
+
444  #define RADIOLIB_HAL_PERSISTENT_STORAGE_BASE (0)
+
445 #endif
+
446 
+
447 // the amount of space allocated to the persistent storage
+
448 #if !defined(RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE)
+
449  #define RADIOLIB_HAL_PERSISTENT_STORAGE_SIZE (0x0180)
+
450 #endif
+
451 
+
452 /*
+
453  * Uncomment on boards whose clock runs too slow or too fast
+
454  * Set the value according to the following scheme:
+
455  * Enable timestamps on your terminal
+
456  * Print something to terminal, wait 1000 milliseconds, print something again
+
457  * If the difference is e.g. 1014 milliseconds between the prints, set this value to 14
+
458  * Or, for more accuracy, wait for 100,000 milliseconds and divide the total drift by 100
+
459  */
+
460 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
+
461  //#define RADIOLIB_CLOCK_DRIFT_MS (0)
+
462 #endif
+
463 
+
464 // This only compiles on STM32 boards with SUBGHZ module, but also
+
465 // include when generating docs
+
466 #if (!defined(ARDUINO_ARCH_STM32) || !defined(SUBGHZSPI_BASE)) && !defined(DOXYGEN)
+
467  #define RADIOLIB_EXCLUDE_STM32WLX
+
468 #endif
+
469 
+
470 #if defined(RADIOLIB_DEBUG)
+
471  #if defined(RADIOLIB_BUILD_ARDUINO)
+
472  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
+
473  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
+
474 
+
475  // some platforms do not support printf("%f"), so it has to be done this way
+
476  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
+
477  #else
+
478  #if !defined(RADIOLIB_DEBUG_PRINT)
+
479  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
+
480  #endif
+
481  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
482  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
483  #endif
+
484  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PRINT("%.3f", VAL)
+
485  #endif
+
486  #define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)
+
487 #else
+
488  #define RADIOLIB_DEBUG_PRINT(...) {}
+
489  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
490  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
+
491  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
+
492 #endif
+
493 
+
494 #if defined(RADIOLIB_VERBOSE)
+
495  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
+
496  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
+
497 #else
+
498  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
499  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
500 #endif
+
501 
+
505 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
506 
+
510 #if defined(RADIOLIB_CHECK_PARAMS)
+
511  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
512 #else
+
513  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
514 #endif
+
515 
+
516 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
+
517  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
518 #else
+
519  #define RADIOLIB_ERRATA_SX127X(...) {}
+
520 #endif
+
521 
+
522 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
+
523 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
+
524 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
+
525 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
526 
+
527 // version definitions
+
528 #define RADIOLIB_VERSION_MAJOR 6
+
529 #define RADIOLIB_VERSION_MINOR 2
+
530 #define RADIOLIB_VERSION_PATCH 0
+
531 #define RADIOLIB_VERSION_EXTRA 0
+
532 
+
533 #define RADIOLIB_VERSION (((RADIOLIB_VERSION_MAJOR) << 24) | ((RADIOLIB_VERSION_MINOR) << 16) | ((RADIOLIB_VERSION_PATCH) << 8) | (RADIOLIB_VERSION_EXTRA))
+
534 
+
535 #endif
diff --git a/_radio_lib_8h_source.html b/_radio_lib_8h_source.html index c868c32c..06ddaba2 100644 --- a/_radio_lib_8h_source.html +++ b/_radio_lib_8h_source.html @@ -109,11 +109,11 @@ $(document).ready(function(){initNavTree('_radio_lib_8h_source.html',''); initRe
55 #if defined(RADIOLIB_DEBUG)
56  #define RADIOLIB_VALUE_TO_STRING(x) #x
57  #define RADIOLIB_VALUE(x) RADIOLIB_VALUE_TO_STRING(x)
-
58  #pragma message("\nRadioLib Debug Info\nVersion " \
+
58  #pragma message("\nRadioLib Debug Info\nVersion: \"" \
59  RADIOLIB_VALUE(RADIOLIB_VERSION_MAJOR) "." \
60  RADIOLIB_VALUE(RADIOLIB_VERSION_MINOR) "." \
61  RADIOLIB_VALUE(RADIOLIB_VERSION_PATCH) "." \
-
62  RADIOLIB_VALUE(RADIOLIB_VERSION_EXTRA) "\n" \
+
62  RADIOLIB_VALUE(RADIOLIB_VERSION_EXTRA) "\"\n" \
63  "Platform: " RADIOLIB_VALUE(RADIOLIB_PLATFORM) "\n" \
64  "Compiled: " RADIOLIB_VALUE(__DATE__) " " RADIOLIB_VALUE(__TIME__) \
65  )
@@ -124,84 +124,89 @@ $(document).ready(function(){initNavTree('_radio_lib_8h_source.html',''); initRe
70  #warning "RadioLib might not be compatible with this Arduino board - check supported platforms at https://github.com/jgromes/RadioLib!"
71 #endif
72 
-
73 #include "modules/CC1101/CC1101.h"
-
74 #include "modules/LLCC68/LLCC68.h"
-
75 #include "modules/nRF24/nRF24.h"
-
76 #include "modules/RF69/RF69.h"
-
77 #include "modules/RFM2x/RFM22.h"
-
78 #include "modules/RFM2x/RFM23.h"
-
79 #include "modules/Si443x/Si4430.h"
-
80 #include "modules/Si443x/Si4431.h"
-
81 #include "modules/Si443x/Si4432.h"
-
82 #include "modules/SX1231/SX1231.h"
-
83 #include "modules/SX126x/SX1261.h"
-
84 #include "modules/SX126x/SX1262.h"
-
85 #include "modules/SX126x/SX1268.h"
-
86 #include "modules/SX126x/STM32WLx.h"
-
87 #include "modules/SX127x/SX1272.h"
-
88 #include "modules/SX127x/SX1273.h"
-
89 #include "modules/SX127x/SX1276.h"
-
90 #include "modules/SX127x/SX1277.h"
-
91 #include "modules/SX127x/SX1278.h"
-
92 #include "modules/SX127x/SX1279.h"
-
93 #include "modules/SX128x/SX1280.h"
-
94 #include "modules/SX128x/SX1281.h"
-
95 #include "modules/SX128x/SX1282.h"
-
96 
-
97 // physical layer protocols
-
98 #include "protocols/PhysicalLayer/PhysicalLayer.h"
-
99 #include "protocols/AFSK/AFSK.h"
-
100 #include "protocols/AX25/AX25.h"
-
101 #include "protocols/Hellschreiber/Hellschreiber.h"
-
102 #include "protocols/Morse/Morse.h"
-
103 #include "protocols/Pager/Pager.h"
-
104 #include "protocols/RTTY/RTTY.h"
-
105 #include "protocols/SSTV/SSTV.h"
-
106 #include "protocols/FSK4/FSK4.h"
-
107 #include "protocols/APRS/APRS.h"
-
108 #include "protocols/ExternalRadio/ExternalRadio.h"
-
109 #include "protocols/Print/Print.h"
-
110 #include "protocols/BellModem/BellModem.h"
-
111 #include "protocols/LoRaWAN/LoRaWAN.h"
-
112 
-
113 // utilities
-
114 #include "utils/CRC.h"
-
115 #include "utils/Cryptography.h"
-
116 
-
117 // only create Radio class when using RadioShield
-
118 #if defined(RADIOLIB_RADIOSHIELD)
-
119 
-
120 // RadioShield pin definitions
-
121 #define RADIOSHIELD_CS_A 10
-
122 #define RADIOSHIELD_IRQ_A 2
-
123 #define RADIOSHIELD_RST_A 9
-
124 #define RADIOSHIELD_GPIO_A 8
-
125 #define RADIOSHIELD_CS_B 5
-
126 #define RADIOSHIELD_IRQ_B 3
-
127 #define RADIOSHIELD_RST_B 7
-
128 #define RADIOSHIELD_GPIO_B 6
-
129 
-
136 class Radio {
-
137  public:
-
138 
-
139  Module* ModuleA;
-
140  Module* ModuleB;
-
141 
-
145  Radio() {
-
146  ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_IRQ_A, RADIOSHIELD_RST_A, RADIOSHIELD_GPIO_A);
-
147  ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_IRQ_B, RADIOSHIELD_RST_B, RADIOSHIELD_GPIO_B);
-
148  }
-
149 
-
150 #if defined(RADIOLIB_GODMODE)
-
151  private:
-
152 #endif
-
153 
-
154 };
-
155 
-
156 Radio RadioShield;
+
73 // print warning for low-end platforms
+
74 #if defined(RADIOLIB_LOWEND_PLATFORM)
+
75  #warning "Low-end platform detected, stability issues are likely!"
+
76 #endif
+
77 
+
78 #include "modules/CC1101/CC1101.h"
+
79 #include "modules/LLCC68/LLCC68.h"
+
80 #include "modules/nRF24/nRF24.h"
+
81 #include "modules/RF69/RF69.h"
+
82 #include "modules/RFM2x/RFM22.h"
+
83 #include "modules/RFM2x/RFM23.h"
+
84 #include "modules/Si443x/Si4430.h"
+
85 #include "modules/Si443x/Si4431.h"
+
86 #include "modules/Si443x/Si4432.h"
+
87 #include "modules/SX1231/SX1231.h"
+
88 #include "modules/SX126x/SX1261.h"
+
89 #include "modules/SX126x/SX1262.h"
+
90 #include "modules/SX126x/SX1268.h"
+
91 #include "modules/SX126x/STM32WLx.h"
+
92 #include "modules/SX127x/SX1272.h"
+
93 #include "modules/SX127x/SX1273.h"
+
94 #include "modules/SX127x/SX1276.h"
+
95 #include "modules/SX127x/SX1277.h"
+
96 #include "modules/SX127x/SX1278.h"
+
97 #include "modules/SX127x/SX1279.h"
+
98 #include "modules/SX128x/SX1280.h"
+
99 #include "modules/SX128x/SX1281.h"
+
100 #include "modules/SX128x/SX1282.h"
+
101 
+
102 // physical layer protocols
+
103 #include "protocols/PhysicalLayer/PhysicalLayer.h"
+
104 #include "protocols/AFSK/AFSK.h"
+
105 #include "protocols/AX25/AX25.h"
+
106 #include "protocols/Hellschreiber/Hellschreiber.h"
+
107 #include "protocols/Morse/Morse.h"
+
108 #include "protocols/Pager/Pager.h"
+
109 #include "protocols/RTTY/RTTY.h"
+
110 #include "protocols/SSTV/SSTV.h"
+
111 #include "protocols/FSK4/FSK4.h"
+
112 #include "protocols/APRS/APRS.h"
+
113 #include "protocols/ExternalRadio/ExternalRadio.h"
+
114 #include "protocols/Print/Print.h"
+
115 #include "protocols/BellModem/BellModem.h"
+
116 #include "protocols/LoRaWAN/LoRaWAN.h"
+
117 
+
118 // utilities
+
119 #include "utils/CRC.h"
+
120 #include "utils/Cryptography.h"
+
121 
+
122 // only create Radio class when using RadioShield
+
123 #if defined(RADIOLIB_RADIOSHIELD)
+
124 
+
125 // RadioShield pin definitions
+
126 #define RADIOSHIELD_CS_A 10
+
127 #define RADIOSHIELD_IRQ_A 2
+
128 #define RADIOSHIELD_RST_A 9
+
129 #define RADIOSHIELD_GPIO_A 8
+
130 #define RADIOSHIELD_CS_B 5
+
131 #define RADIOSHIELD_IRQ_B 3
+
132 #define RADIOSHIELD_RST_B 7
+
133 #define RADIOSHIELD_GPIO_B 6
+
134 
+
141 class Radio {
+
142  public:
+
143 
+
144  Module* ModuleA;
+
145  Module* ModuleB;
+
146 
+
150  Radio() {
+
151  ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_IRQ_A, RADIOSHIELD_RST_A, RADIOSHIELD_GPIO_A);
+
152  ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_IRQ_B, RADIOSHIELD_RST_B, RADIOSHIELD_GPIO_B);
+
153  }
+
154 
+
155 #if defined(RADIOLIB_GODMODE)
+
156  private:
157 #endif
158 
-
159 #endif
+
159 };
+
160 
+
161 Radio RadioShield;
+
162 #endif
+
163 
+
164 #endif
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:31