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