From ca856bcc050fb830739f041074aedd9e73b483c7 Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 15 Aug 2022 17:20:46 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20da099?= =?UTF-8?q?3a6edf9e48a66ad44a01923708244be01af=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _build_opt_8h_source.html | 1877 ++++++++++++++++---------------- _c_c1101_8h_source.html | 117 +- _physical_layer_8h_source.html | 115 +- _r_f69_8h_source.html | 103 +- _s_x126x_8h_source.html | 184 ++-- _s_x127x_8h_source.html | 151 +-- _s_x128x_8h_source.html | 165 +-- _si443x_8h_source.html | 99 +- n_r_f24_8h_source.html | 61 +- 9 files changed, 1451 insertions(+), 1421 deletions(-) diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index a894cbbb..8ac24541 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -196,944 +196,945 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
108  //#define RADIOLIB_EXCLUDE_MORSE
109  //#define RADIOLIB_EXCLUDE_RTTY
110  //#define RADIOLIB_EXCLUDE_SSTV
-
111 
-
112 #else
-
113  #if defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
-
114  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
-
115  #define RADIOLIB_PLATFORM "Arduino AVR"
-
116  #define RADIOLIB_PIN_TYPE uint8_t
-
117  #define RADIOLIB_PIN_MODE uint8_t
-
118  #define RADIOLIB_PIN_STATUS uint8_t
-
119  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
120  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
121  #define RADIOLIB_NC (0xFF)
-
122  #define RADIOLIB_DEFAULT_SPI SPI
-
123  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
124  #define RADIOLIB_NONVOLATILE PROGMEM
-
125  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
126  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
127 
-
128  // Arduino API callbacks
-
129  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
130  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
131  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
-
132  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
133  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
134  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
-
135  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
136  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
137  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
138  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
139  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
140  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
141  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
142  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
143  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
144  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
145  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
146  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
147 
-
148  #elif defined(ESP8266)
-
149  // ESP8266 boards
-
150  #define RADIOLIB_PLATFORM "ESP8266"
-
151  #define RADIOLIB_PIN_TYPE uint8_t
-
152  #define RADIOLIB_PIN_MODE uint8_t
-
153  #define RADIOLIB_PIN_STATUS uint8_t
-
154  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
155  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
156  #define RADIOLIB_NC (0xFF)
-
157  #define RADIOLIB_DEFAULT_SPI SPI
-
158  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
159  #define RADIOLIB_NONVOLATILE PROGMEM
-
160  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
161  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
162 
-
163  // Arduino API callbacks
-
164  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
165  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
166  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
-
167  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
168  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
169  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*)(void), int mode)
-
170  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
171  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
172  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long)
-
173  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
174  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
175  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
176  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
177  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
178  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
179  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
180  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
181  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
182 
-
183  #elif defined(ESP32)
-
184  // ESP32 boards
-
185  #define RADIOLIB_PLATFORM "ESP32"
-
186  #define RADIOLIB_PIN_TYPE uint8_t
-
187  #define RADIOLIB_PIN_MODE uint8_t
-
188  #define RADIOLIB_PIN_STATUS uint8_t
-
189  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
190  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
191  #define RADIOLIB_NC (0xFF)
-
192  #define RADIOLIB_DEFAULT_SPI SPI
-
193  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
194  #define RADIOLIB_NONVOLATILE PROGMEM
-
195  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
196  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
197 
-
198  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
-
199  #define RADIOLIB_TONE_UNSUPPORTED
-
200  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
-
201 
-
202  // Arduino API callbacks
-
203  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
204  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
205  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
-
206  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
-
207  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
-
208  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*)(void), int mode)
-
209  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin)
-
210  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
211  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t)
-
212  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t us)
-
213  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
214  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
215  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
216  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
217  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
218  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
219  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
220  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
221 
-
222  #elif defined(ARDUINO_ARCH_STM32)
-
223  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
-
224  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
-
225  #define RADIOLIB_PIN_TYPE uint32_t
-
226  #define RADIOLIB_PIN_MODE uint32_t
-
227  #define RADIOLIB_PIN_STATUS uint32_t
-
228  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
229  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt((PinName)p)
-
230  #define RADIOLIB_NC (0xFFFFFFFF)
-
231  #define RADIOLIB_DEFAULT_SPI SPI
-
232  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
233  #define RADIOLIB_NONVOLATILE PROGMEM
-
234  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
235  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
236 
-
237  // slow down SX126x/8x SPI on this platform
-
238  #define RADIOLIB_SPI_SLOWDOWN
-
239 
-
240  // Arduino API callbacks
-
241  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
-
242  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
-
243  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
-
244  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
245  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin, bool destruct)
-
246  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, callback_function_t callback, uint32_t mode)
-
247  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
-
248  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
249  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t ms)
-
250  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t us)
-
251  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
-
252  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
-
253  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
-
254  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
255  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
256  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
257  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
258  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
259 
-
260  #elif defined(SAMD_SERIES)
-
261  // Adafruit SAMD boards (M0 and M4)
-
262  #define RADIOLIB_PLATFORM "Adafruit SAMD"
-
263  #define RADIOLIB_PIN_TYPE uint32_t
-
264  #define RADIOLIB_PIN_MODE uint32_t
-
265  #define RADIOLIB_PIN_STATUS uint32_t
-
266  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
267  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
268  #define RADIOLIB_NC (0xFFFFFFFF)
-
269  #define RADIOLIB_DEFAULT_SPI SPI
-
270  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
271  #define RADIOLIB_NONVOLATILE PROGMEM
-
272  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
273  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
274 
-
275  // slow down SX126x/8x SPI on this platform
-
276  #define RADIOLIB_SPI_SLOWDOWN
-
277 
-
278  // Arduino API callbacks
-
279  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
-
280  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
-
281  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
-
282  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, uint32_t frequency, uint32_t duration)
-
283  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
-
284  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, voidFuncPtr callback, uint32_t mode)
-
285  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
-
286  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
287  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long dwMs)
-
288  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int)
-
289  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
290  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
291  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
-
292  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
293  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
294  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
295  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
296  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
297 
-
298  #elif defined(ARDUINO_ARCH_SAMD)
-
299  // Arduino SAMD (Zero, MKR, etc.)
-
300  #define RADIOLIB_PLATFORM "Arduino SAMD"
-
301  #define RADIOLIB_PIN_TYPE pin_size_t
-
302  #define RADIOLIB_PIN_MODE PinMode
-
303  #define RADIOLIB_PIN_STATUS PinStatus
-
304  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
305  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
306  #define RADIOLIB_NC (0xFF)
-
307  #define RADIOLIB_DEFAULT_SPI SPI
-
308  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
309  #define RADIOLIB_NONVOLATILE PROGMEM
-
310  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
311  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
312 
-
313  // Arduino API callbacks
-
314  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pinNumber, PinMode pinMode)
-
315  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pinNumber, PinStatus status)
-
316  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pinNumber)
-
317  #define RADIOLIB_CB_ARGS_TONE (void, tone, unsigned char outputPin, unsigned int frequency, unsigned long duration)
-
318  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t outputPin)
-
319  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t pin, voidFuncPtr callback, PinStatus mode)
-
320  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t pin)
-
321  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
322  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long)
-
323  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
324  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
325  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
326  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, pin_size_t pin, uint8_t state, uint32_t timeout)
-
327  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
328  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
329  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
330  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
331  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
332 
-
333  #elif defined(__SAM3X8E__)
-
334  // Arduino Due
-
335  #define RADIOLIB_PLATFORM "Arduino Due"
-
336  #define RADIOLIB_PIN_TYPE uint32_t
-
337  #define RADIOLIB_PIN_MODE uint32_t
-
338  #define RADIOLIB_PIN_STATUS uint32_t
-
339  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
340  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
341  #define RADIOLIB_NC (0xFFFFFFFF)
-
342  #define RADIOLIB_DEFAULT_SPI SPI
-
343  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
344  #define RADIOLIB_NONVOLATILE PROGMEM
-
345  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
346  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
347  #define RADIOLIB_TONE_UNSUPPORTED
-
348 
-
349  // Arduino API callbacks
-
350  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
-
351  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
-
352  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
-
353  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
-
354  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
-
355  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, void (*callback)(void), uint32_t mode)
-
356  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
-
357  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
358  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t dwMs)
-
359  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t usec)
-
360  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
-
361  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
-
362  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
-
363  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
364  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
365  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
366  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
367  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
368 
-
369  #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
-
370  // Adafruit nRF52 boards
-
371  #define RADIOLIB_PLATFORM "Adafruit nRF52"
-
372  #define RADIOLIB_PIN_TYPE uint32_t
-
373  #define RADIOLIB_PIN_MODE uint32_t
-
374  #define RADIOLIB_PIN_STATUS uint32_t
-
375  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
376  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
377  #define RADIOLIB_NC (0xFFFFFFFF)
-
378  #define RADIOLIB_DEFAULT_SPI SPI
-
379  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
380  #define RADIOLIB_NONVOLATILE PROGMEM
-
381  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
382  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
383 
-
384  // Arduino API callbacks
-
385  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
-
386  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
-
387  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
-
388  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
389  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
390  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (int, attachInterrupt, uint32_t pin, voidFuncPtr callback, uint32_t mode)
-
391  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
-
392  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
393  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t dwMs)
-
394  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t usec)
-
395  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
-
396  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
-
397  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
-
398  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
399  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
400  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
401  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
402  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
403 
-
404  #elif defined(ARDUINO_ARC32_TOOLS)
-
405  // Intel Curie
-
406  #define RADIOLIB_PLATFORM "Intel Curie"
-
407  #define RADIOLIB_PIN_TYPE uint8_t
-
408  #define RADIOLIB_PIN_MODE uint8_t
-
409  #define RADIOLIB_PIN_STATUS uint8_t
-
410  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
411  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
412  #define RADIOLIB_NC (0xFF)
-
413  #define RADIOLIB_DEFAULT_SPI SPI
-
414  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
415  #define RADIOLIB_NONVOLATILE PROGMEM
-
416  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
417  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
418 
-
419  // Arduino API callbacks
-
420  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
421  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t val)
-
422  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
-
423  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, unsigned int frequency, unsigned long duration)
-
424  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
-
425  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, void (*callback)(void), uint32_t mode)
-
426  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
-
427  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
428  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t dwMs)
-
429  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t dwUs)
-
430  #define RADIOLIB_CB_ARGS_MILLIS (uint64_t, millis, void)
-
431  #define RADIOLIB_CB_ARGS_MICROS (uint64_t, micros, void)
-
432  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
-
433  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
434  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
435  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
436  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
437  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
438 
-
439  #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY)
-
440  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
-
441  #define RADIOLIB_PLATFORM "Arduino megaAVR"
-
442  #define RADIOLIB_PIN_TYPE uint8_t
-
443  #define RADIOLIB_PIN_MODE PinMode
-
444  #define RADIOLIB_PIN_STATUS PinStatus
-
445  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
446  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
447  #define RADIOLIB_NC (0xFF)
-
448  #define RADIOLIB_DEFAULT_SPI SPI
-
449  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
450  #define RADIOLIB_NONVOLATILE PROGMEM
-
451  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
452  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
453 
-
454  // Arduino API callbacks
-
455  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, PinMode mode)
-
456  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, PinStatus val)
-
457  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, uint8_t pin)
-
458  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
459  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
460  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*userFunc)(void), PinStatus mode)
-
461  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin)
-
462  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
463  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
464  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
465  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
466  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
467  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
468  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
469  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
470  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
471  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
472  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
473 
-
474  #elif defined(ARDUINO_ARCH_APOLLO3)
-
475  // Sparkfun Apollo3 boards
-
476  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
-
477  #define RADIOLIB_PIN_TYPE pin_size_t
-
478  #define RADIOLIB_PIN_MODE Arduino_PinMode
-
479  #define RADIOLIB_PIN_STATUS PinStatus
-
480  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
481  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
482  #define RADIOLIB_NC (0xFF)
-
483  #define RADIOLIB_DEFAULT_SPI SPI
-
484  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
485  #define RADIOLIB_NONVOLATILE PROGMEM
-
486  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
487  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
488 
-
489  // slow down SX126x/8x SPI on this platform
-
490  #define RADIOLIB_SPI_SLOWDOWN
-
491 
-
492  // Arduino API callbacks
-
493  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pinName, Arduino_PinMode pinMode)
-
494  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pinName, PinStatus val)
-
495  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pinName)
-
496  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
497  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
498  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNumber, voidFuncPtr callback, PinStatus mode)
-
499  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNumber)
-
500  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
501  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
502  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
503  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
504  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
505  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, uint8_t state, unsigned long timeout)
-
506  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
507  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
508  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
509  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
510  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
511 
-
512  #elif defined(ARDUINO_ARDUINO_NANO33BLE)
-
513  // Arduino Nano 33 BLE
-
514  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
-
515  #define RADIOLIB_PIN_TYPE pin_size_t
-
516  #define RADIOLIB_PIN_MODE PinMode
-
517  #define RADIOLIB_PIN_STATUS PinStatus
-
518  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
519  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
520  #define RADIOLIB_NC (0xFF)
-
521  #define RADIOLIB_DEFAULT_SPI SPI
-
522  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
523  #define RADIOLIB_NONVOLATILE PROGMEM
-
524  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
525  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
526 
-
527  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
528  #define RADIOLIB_TONE_UNSUPPORTED
-
529  #define RADIOLIB_MBED_TONE_OVERRIDE
-
530 
-
531  // Arduino API callbacks
-
532  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
-
533  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
-
534  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
-
535  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
536  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
537  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
-
538  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
-
539  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
540  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
541  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
542  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
543  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
544  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, PinStatus state, unsigned long timeout)
-
545  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
546  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
547  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
548  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
549  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
550 
-
551  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
-
552  // Arduino Portenta H7
-
553  #define RADIOLIB_PLATFORM "Portenta H7"
-
554  #define RADIOLIB_PIN_TYPE pin_size_t
-
555  #define RADIOLIB_PIN_MODE PinMode
-
556  #define RADIOLIB_PIN_STATUS PinStatus
-
557  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
558  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
559  #define RADIOLIB_NC (0xFF)
-
560  #define RADIOLIB_DEFAULT_SPI SPI
-
561  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
562  #define RADIOLIB_NONVOLATILE PROGMEM
-
563  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
564  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
565 
-
566  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
567  #define RADIOLIB_TONE_UNSUPPORTED
-
568  #define RADIOLIB_MBED_TONE_OVERRIDE
-
569 
-
570  // Arduino API callbacks
-
571  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
-
572  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
-
573  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
-
574  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
575  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
576  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
-
577  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
-
578  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
579  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
580  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
581  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
582  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
583  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, PinStatus state, unsigned long timeout)
-
584  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
585  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
586  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
587  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
588  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
589 
-
590  #elif defined(__STM32F4__) || defined(__STM32F1__)
-
591  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
-
592  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
-
593  #define RADIOLIB_PIN_TYPE uint8_t
-
594  #define RADIOLIB_PIN_MODE WiringPinMode
-
595  #define RADIOLIB_PIN_STATUS uint8_t
-
596  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
-
597  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
598  #define RADIOLIB_NC (0xFF)
-
599  #define RADIOLIB_DEFAULT_SPI SPI
-
600  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
601  #define RADIOLIB_NONVOLATILE PROGMEM
-
602  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
603  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
604 
-
605  // Arduino API callbacks
-
606  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8 pin, WiringPinMode mode)
-
607  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8 pin, uint8 val)
-
608  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint32_t, digitalRead, uint8 pin)
-
609  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, uint32_t frequency, uint32_t duration)
-
610  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
-
611  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode)
-
612  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8 pin)
-
613  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
614  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
615  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32 us)
-
616  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
-
617  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
-
618  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t ulPin, uint32_t ulState, uint32_t ulTimeout)
-
619  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
620  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
621  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
622  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
623  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
624 
-
625  #elif defined(ARDUINO_ARCH_MEGAAVR)
-
626  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
-
627  #define RADIOLIB_PLATFORM "MegaCoreX"
-
628  #define RADIOLIB_PIN_TYPE uint8_t
-
629  #define RADIOLIB_PIN_MODE uint8_t
-
630  #define RADIOLIB_PIN_STATUS uint8_t
-
631  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
632  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
633  #define RADIOLIB_NC (0xFF)
-
634  #define RADIOLIB_DEFAULT_SPI SPI
-
635  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
636  #define RADIOLIB_NONVOLATILE PROGMEM
-
637  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
638  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
639 
-
640  // Arduino API callbacks
-
641  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
642  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
643  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin)
-
644  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
645  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
646  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*userFunc)(void), uint8_t mode)
-
647  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
648  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
649  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
650  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
651  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
652  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
653  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
654  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
655  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
656  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
657  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
658  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
659 
-
660  #elif defined(ARDUINO_ARCH_RP2040)
-
661  // Raspberry Pi Pico
-
662  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
-
663  #define RADIOLIB_PIN_TYPE pin_size_t
-
664  #define RADIOLIB_PIN_MODE PinMode
-
665  #define RADIOLIB_PIN_STATUS PinStatus
-
666  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
667  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
668  #define RADIOLIB_NC (0xFF)
-
669  #define RADIOLIB_DEFAULT_SPI SPI
-
670  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
671  #define RADIOLIB_NONVOLATILE PROGMEM
-
672  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
673  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
674 
-
675  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
-
676  #define RADIOLIB_TONE_UNSUPPORTED
-
677  #define RADIOLIB_MBED_TONE_OVERRIDE
-
678 
-
679  // Arduino API callbacks
-
680  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
-
681  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
-
682  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
-
683  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
-
684  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
-
685  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
-
686  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
-
687  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
688  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
689  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
690  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
691  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
692  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, PinStatus state, unsigned long timeout)
-
693  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
694  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
695  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
696  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
697  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
698 
-
699  #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
-
700  // CubeCell
-
701  #define RADIOLIB_PLATFORM "CubeCell"
-
702  #define RADIOLIB_PIN_TYPE uint8_t
-
703  #define RADIOLIB_PIN_MODE PINMODE
-
704  #define RADIOLIB_PIN_STATUS uint8_t
-
705  #define RADIOLIB_INTERRUPT_STATUS IrqModes
-
706  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
707  #define RADIOLIB_NC (0xFF)
-
708  #define RADIOLIB_DEFAULT_SPI SPI
-
709  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
710  #define RADIOLIB_NONVOLATILE PROGMEM
-
711  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
712 
-
713  // Arduino API callbacks
-
714  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, PINMODE mode)
-
715  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin_name, uint8_t level)
-
716  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin_name)
-
717  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
-
718  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
-
719  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin_name, GpioIrqHandler GpioIrqHandlerCallback, IrqModes interrupt_mode)
-
720  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin_name)
-
721  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
722  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t milliseconds)
-
723  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint16 microseconds)
-
724  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
-
725  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
-
726  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint8_t pin_name, uint8_t mode, uint32_t timeout)
-
727  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
728  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
729  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
730  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
731  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
732 
-
733  // provide an easy access to the on-board module
-
734  #include "board-config.h"
-
735  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
-
736 
-
737  // CubeCell doesn't seem to define nullptr, let's do something like that now
-
738  #define nullptr NULL
-
739 
-
740  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
-
741  #undef pinMode
-
742 
-
743  // ... and uses an outdated GCC which does not support type aliases
-
744  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
-
745 
-
746  // ... and it also has no tone(). This platform was designed by an idiot.
-
747  #define RADIOLIB_TONE_UNSUPPORTED
-
748 
-
749  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
-
750  #define RADIOLIB_YIELD_UNSUPPORTED
-
751  #if defined(yield)
-
752  #undef yield
-
753  #endif
-
754 
-
755  #elif defined(RASPI)
-
756  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
-
757  #define RADIOLIB_PLATFORM "RasPiArduino"
-
758  #define RADIOLIB_PIN_TYPE uint8_t
-
759  #define RADIOLIB_PIN_MODE uint8_t
-
760  #define RADIOLIB_PIN_STATUS uint8_t
-
761  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
762  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
763  #define RADIOLIB_NC (0xFF)
-
764  #define RADIOLIB_DEFAULT_SPI SPI
-
765  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
766  #define RADIOLIB_NONVOLATILE PROGMEM
-
767  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
768  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
769 
-
770  // Arduino API callbacks
-
771  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
772  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
773  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
-
774  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
775  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
776  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
-
777  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
778  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
779  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t ms)
-
780  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
781  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
782  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
783  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
784  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
785  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
786  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
787  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
788  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
789 
-
790  // let's start off easy - no tone on this platform, that can happen
-
791  #define RADIOLIB_TONE_UNSUPPORTED
-
792 
-
793  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
-
794  #define RADIOLIB_YIELD_UNSUPPORTED
-
795 
-
796  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
-
797  #define PGM_P const char *
-
798 
-
799  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
-
800  #if defined(millis)
-
801  #undef millis
-
802  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
-
803  #endif
-
804 
-
805  #if defined(micros)
-
806  #undef micros
-
807  inline unsigned long micros() { return((unsigned long)(STCV)); };
-
808  #endif
-
809 
-
810  #elif defined(TEENSYDUINO)
-
811  // Teensy
-
812  #define RADIOLIB_PLATFORM "Teensy"
-
813  #define RADIOLIB_PIN_TYPE uint8_t
-
814  #define RADIOLIB_PIN_MODE uint8_t
-
815  #define RADIOLIB_PIN_STATUS uint8_t
-
816  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
817  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
818  #define RADIOLIB_NC (0xFF)
-
819  #define RADIOLIB_DEFAULT_SPI SPI
-
820  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
821  #define RADIOLIB_NONVOLATILE PROGMEM
-
822  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
823  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
824 
-
825  // Arduino API callbacks
-
826  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
827  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
828  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin)
-
829  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, short unsigned int frequency, long unsigned int duration)
-
830  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
831  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
-
832  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
833  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
834  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
835  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, long unsigned int us)
-
836  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
837  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
838  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
839  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
840  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
841  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
842  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
843  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
844 
-
845  #else
-
846  // other Arduino platforms not covered by the above list - this may or may not work
-
847  #define RADIOLIB_PLATFORM "Unknown Arduino"
-
848  #define RADIOLIB_UNKNOWN_PLATFORM
-
849  #define RADIOLIB_PIN_TYPE uint8_t
-
850  #define RADIOLIB_PIN_MODE uint8_t
-
851  #define RADIOLIB_PIN_STATUS uint8_t
-
852  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
-
853  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
-
854  #define RADIOLIB_NC (0xFF)
-
855  #define RADIOLIB_DEFAULT_SPI SPI
-
856  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
-
857  #define RADIOLIB_NONVOLATILE PROGMEM
-
858  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
-
859  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
-
860 
-
861  // Arduino API callbacks
-
862  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
-
863  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
-
864  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
-
865  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
-
866  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
-
867  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
-
868  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
-
869  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
-
870  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
-
871  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
-
872  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
-
873  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
-
874  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
-
875  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
-
876  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
-
877  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
-
878  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
-
879  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
-
880 
-
881  #endif
-
882 #endif
-
883 
-
884 #else
-
885  // generic non-Arduino platform
-
886  #define RADIOLIB_PLATFORM "Generic"
-
887 
-
888  // platform properties may be defined here, or somewhere else in the build system
-
889  #include "noarduino.h"
-
890 
-
891 #endif
-
892 
-
893 /*
-
894  * Uncomment to enable debug output.
-
895  * Warning: Debug output will slow down the whole system significantly.
-
896  * Also, it will result in larger compiled binary.
-
897  * Levels: debug - only main info
-
898  * verbose - full transcript of all SPI communication
-
899  */
-
900 #if !defined(RADIOLIB_DEBUG)
-
901  //#define RADIOLIB_DEBUG
-
902 #endif
-
903 #if !defined(RADIOLIB_VERBOSE)
-
904  //#define RADIOLIB_VERBOSE
-
905 #endif
-
906 
-
907 // set which output port should be used for debug output
-
908 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
-
909 #if !defined(RADIOLIB_DEBUG_PORT)
-
910  #define RADIOLIB_DEBUG_PORT Serial
-
911 #endif
-
912 
-
913 /*
-
914  * Uncomment to enable "paranoid" SPI mode
-
915  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
-
916  * This improves reliablility, but slightly slows down communication.
-
917  * Note: Enabled by default.
-
918  */
-
919 #if !defined(RADIOLIB_SPI_PARANOID)
-
920  #define RADIOLIB_SPI_PARANOID
-
921 #endif
-
922 
-
923 /*
-
924  * Uncomment to enable parameter range checking
-
925  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
-
926  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
-
927  * possibly leading to bricked module and/or program crashing.
-
928  * Note: Enabled by default.
-
929  */
-
930 #if !defined(RADIOLIB_CHECK_PARAMS)
-
931  #define RADIOLIB_CHECK_PARAMS
-
932 #endif
-
933 
-
934 /*
-
935  * Uncomment to enable SX127x errata fix
-
936  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
-
937  * It should only be enabled if you really are observing some errata-related issue.
-
938  * Note: Disabled by default.
-
939  */
-
940 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
-
941  //#define RADIOLIB_FIX_ERRATA_SX127X
-
942 #endif
-
943 
-
944 /*
-
945  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
-
946  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
-
947  * Failure to heed the above warning may result in bricked module.
-
948  */
-
949 #if !defined(RADIOLIB_GODMODE)
-
950  //#define RADIOLIB_GODMODE
-
951 #endif
-
952 
-
953 /*
-
954  * Uncomment to enable low-level hardware access
-
955  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
-
956  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
-
957  */
-
958 #if !defined(RADIOLIB_LOW_LEVEL)
-
959  //#define RADIOLIB_LOW_LEVEL
-
960 #endif
-
961 
-
962 /*
-
963  * Uncomment to enable pre-defined modules when using RadioShield.
-
964  */
-
965 #if !defined(RADIOLIB_RADIOSHIELD)
-
966  //#define RADIOLIB_RADIOSHIELD
-
967 #endif
-
968 
-
969 /*
-
970  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
-
971  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
-
972  */
-
973 #if !defined(RADIOLIB_STATIC_ONLY)
-
974  //#define RADIOLIB_STATIC_ONLY
-
975 #endif
-
976 
-
977 // set the size of static arrays to use
-
978 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
-
979  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
-
980 #endif
-
981 
-
982 #if defined(RADIOLIB_DEBUG)
-
983  #if defined(RADIOLIB_BUILD_ARDUINO)
-
984  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
-
985  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
-
986  #else
-
987  #if !defined(RADIOLIB_DEBUG_PRINT)
-
988  #define RADIOLIB_DEBUG_PRINT(...) { frintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__); }
-
989  #endif
-
990  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
991  #define RADIOLIB_DEBUG_PRINTLN(...) { printf(RADIOLIB_DEBUG_PORT, __VA_ARGS__ "\n"); }
-
992  #endif
-
993  #endif
-
994 #else
-
995  #define RADIOLIB_DEBUG_PRINT(...) {}
-
996  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
997 #endif
-
998 
-
999 #if defined(RADIOLIB_VERBOSE)
-
1000  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
-
1001  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
-
1002 #else
-
1003  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
1004  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
1005 #endif
-
1006 
-
1010 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
-
1011 
-
1012 /*
-
1013  * Macros that create callback for the hardware abstraction layer.
-
1014  *
-
1015  * This is the most evil thing I have ever created. I am deeply sorry to anyone currently reading this text.
-
1016  * Come one, come all and witness the horror:
-
1017  * Variadics, forced expansions, inlined function, string concatenation, and it even messes up access specifiers.
-
1018  */
-
1019 #define RADIOLIB_FIRST(arg, ...) arg
-
1020 #define RADIOLIB_REST(arg, ...) __VA_ARGS__
-
1021 #define RADIOLIB_EXP(...) __VA_ARGS__
-
1022 
-
1023 #define RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, FUNC, ...) public: typedef RET (*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC = nullptr;
-
1024 #define RADIOLIB_GENERATE_CALLBACK_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, __VA_ARGS__)
-
1025 #define RADIOLIB_GENERATE_CALLBACK(CB) RADIOLIB_GENERATE_CALLBACK_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
-
1026 
-
1027 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, FUNC, ...) public: typedef RET (Module::*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC = nullptr;
-
1028 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, __VA_ARGS__)
-
1029 #define RADIOLIB_GENERATE_CALLBACK_SPI(CB) RADIOLIB_GENERATE_CALLBACK_SPI_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
-
1030 
-
1034 #if defined(RADIOLIB_CHECK_PARAMS)
-
1035  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
1036 #else
-
1037  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
1038 #endif
-
1039 
-
1040 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
-
1041  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
1042 #else
-
1043  #define RADIOLIB_ERRATA_SX127X(...) {}
-
1044 #endif
-
1045 
-
1046 // version definitions
-
1047 #define RADIOLIB_VERSION_MAJOR (0x05)
-
1048 #define RADIOLIB_VERSION_MINOR (0x03)
-
1049 #define RADIOLIB_VERSION_PATCH (0x00)
-
1050 #define RADIOLIB_VERSION_EXTRA (0x00)
-
1051 
-
1052 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
-
1053 
-
1054 #endif
+
111  //#define RADIOLIB_EXCLUDE_DIRECT_RECEIVE
+
112 
+
113 #else
+
114  #if defined(__AVR__) && !(defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) || defined(ARDUINO_ARCH_MEGAAVR))
+
115  // Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
+
116  #define RADIOLIB_PLATFORM "Arduino AVR"
+
117  #define RADIOLIB_PIN_TYPE uint8_t
+
118  #define RADIOLIB_PIN_MODE uint8_t
+
119  #define RADIOLIB_PIN_STATUS uint8_t
+
120  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
121  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
122  #define RADIOLIB_NC (0xFF)
+
123  #define RADIOLIB_DEFAULT_SPI SPI
+
124  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
125  #define RADIOLIB_NONVOLATILE PROGMEM
+
126  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
127  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
128 
+
129  // Arduino API callbacks
+
130  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
131  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
132  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
+
133  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
134  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
135  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
+
136  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
137  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
138  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
139  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
140  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
141  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
142  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
143  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
144  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
145  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
146  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
147  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
148 
+
149  #elif defined(ESP8266)
+
150  // ESP8266 boards
+
151  #define RADIOLIB_PLATFORM "ESP8266"
+
152  #define RADIOLIB_PIN_TYPE uint8_t
+
153  #define RADIOLIB_PIN_MODE uint8_t
+
154  #define RADIOLIB_PIN_STATUS uint8_t
+
155  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
156  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
157  #define RADIOLIB_NC (0xFF)
+
158  #define RADIOLIB_DEFAULT_SPI SPI
+
159  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
160  #define RADIOLIB_NONVOLATILE PROGMEM
+
161  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
162  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
163 
+
164  // Arduino API callbacks
+
165  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
166  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
167  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
+
168  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
169  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
170  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*)(void), int mode)
+
171  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
172  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
173  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long)
+
174  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
175  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
176  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
177  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
178  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
179  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
180  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
181  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
182  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
183 
+
184  #elif defined(ESP32)
+
185  // ESP32 boards
+
186  #define RADIOLIB_PLATFORM "ESP32"
+
187  #define RADIOLIB_PIN_TYPE uint8_t
+
188  #define RADIOLIB_PIN_MODE uint8_t
+
189  #define RADIOLIB_PIN_STATUS uint8_t
+
190  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
191  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
192  #define RADIOLIB_NC (0xFF)
+
193  #define RADIOLIB_DEFAULT_SPI SPI
+
194  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
195  #define RADIOLIB_NONVOLATILE PROGMEM
+
196  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
197  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
198 
+
199  // ESP32 doesn't support tone(), but it can be emulated via LED control peripheral
+
200  #define RADIOLIB_TONE_UNSUPPORTED
+
201  #define RADIOLIB_TONE_ESP32_CHANNEL (1)
+
202 
+
203  // Arduino API callbacks
+
204  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
205  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
206  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
+
207  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
+
208  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
+
209  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*)(void), int mode)
+
210  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin)
+
211  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
212  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t)
+
213  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t us)
+
214  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
215  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
216  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
217  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
218  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
219  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
220  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
221  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
222 
+
223  #elif defined(ARDUINO_ARCH_STM32)
+
224  // official STM32 Arduino core (https://github.com/stm32duino/Arduino_Core_STM32)
+
225  #define RADIOLIB_PLATFORM "Arduino STM32 (official)"
+
226  #define RADIOLIB_PIN_TYPE uint32_t
+
227  #define RADIOLIB_PIN_MODE uint32_t
+
228  #define RADIOLIB_PIN_STATUS uint32_t
+
229  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
230  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt((PinName)p)
+
231  #define RADIOLIB_NC (0xFFFFFFFF)
+
232  #define RADIOLIB_DEFAULT_SPI SPI
+
233  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
234  #define RADIOLIB_NONVOLATILE PROGMEM
+
235  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
236  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
237 
+
238  // slow down SX126x/8x SPI on this platform
+
239  #define RADIOLIB_SPI_SLOWDOWN
+
240 
+
241  // Arduino API callbacks
+
242  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
+
243  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
+
244  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
+
245  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
246  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin, bool destruct)
+
247  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, callback_function_t callback, uint32_t mode)
+
248  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
+
249  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
250  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t ms)
+
251  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t us)
+
252  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
+
253  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
+
254  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
+
255  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
256  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
257  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
258  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
259  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
260 
+
261  #elif defined(SAMD_SERIES)
+
262  // Adafruit SAMD boards (M0 and M4)
+
263  #define RADIOLIB_PLATFORM "Adafruit SAMD"
+
264  #define RADIOLIB_PIN_TYPE uint32_t
+
265  #define RADIOLIB_PIN_MODE uint32_t
+
266  #define RADIOLIB_PIN_STATUS uint32_t
+
267  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
268  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
269  #define RADIOLIB_NC (0xFFFFFFFF)
+
270  #define RADIOLIB_DEFAULT_SPI SPI
+
271  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
272  #define RADIOLIB_NONVOLATILE PROGMEM
+
273  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
274  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
275 
+
276  // slow down SX126x/8x SPI on this platform
+
277  #define RADIOLIB_SPI_SLOWDOWN
+
278 
+
279  // Arduino API callbacks
+
280  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
+
281  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
+
282  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
+
283  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, uint32_t frequency, uint32_t duration)
+
284  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
+
285  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, voidFuncPtr callback, uint32_t mode)
+
286  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
+
287  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
288  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long dwMs)
+
289  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int)
+
290  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
291  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
292  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
+
293  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
294  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
295  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
296  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
297  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
298 
+
299  #elif defined(ARDUINO_ARCH_SAMD)
+
300  // Arduino SAMD (Zero, MKR, etc.)
+
301  #define RADIOLIB_PLATFORM "Arduino SAMD"
+
302  #define RADIOLIB_PIN_TYPE pin_size_t
+
303  #define RADIOLIB_PIN_MODE PinMode
+
304  #define RADIOLIB_PIN_STATUS PinStatus
+
305  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
306  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
307  #define RADIOLIB_NC (0xFF)
+
308  #define RADIOLIB_DEFAULT_SPI SPI
+
309  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
310  #define RADIOLIB_NONVOLATILE PROGMEM
+
311  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
312  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
313 
+
314  // Arduino API callbacks
+
315  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pinNumber, PinMode pinMode)
+
316  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pinNumber, PinStatus status)
+
317  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pinNumber)
+
318  #define RADIOLIB_CB_ARGS_TONE (void, tone, unsigned char outputPin, unsigned int frequency, unsigned long duration)
+
319  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t outputPin)
+
320  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t pin, voidFuncPtr callback, PinStatus mode)
+
321  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t pin)
+
322  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
323  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long)
+
324  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
325  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
326  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
327  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, pin_size_t pin, uint8_t state, uint32_t timeout)
+
328  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
329  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
330  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
331  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
332  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
333 
+
334  #elif defined(__SAM3X8E__)
+
335  // Arduino Due
+
336  #define RADIOLIB_PLATFORM "Arduino Due"
+
337  #define RADIOLIB_PIN_TYPE uint32_t
+
338  #define RADIOLIB_PIN_MODE uint32_t
+
339  #define RADIOLIB_PIN_STATUS uint32_t
+
340  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
341  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
342  #define RADIOLIB_NC (0xFFFFFFFF)
+
343  #define RADIOLIB_DEFAULT_SPI SPI
+
344  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
345  #define RADIOLIB_NONVOLATILE PROGMEM
+
346  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
347  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
348  #define RADIOLIB_TONE_UNSUPPORTED
+
349 
+
350  // Arduino API callbacks
+
351  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
+
352  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
+
353  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
+
354  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
+
355  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
+
356  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, void (*callback)(void), uint32_t mode)
+
357  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
+
358  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
359  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t dwMs)
+
360  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t usec)
+
361  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
+
362  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
+
363  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
+
364  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
365  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
366  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
367  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
368  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
369 
+
370  #elif (defined(NRF52832_XXAA) || defined(NRF52840_XXAA)) && !defined(ARDUINO_ARDUINO_NANO33BLE)
+
371  // Adafruit nRF52 boards
+
372  #define RADIOLIB_PLATFORM "Adafruit nRF52"
+
373  #define RADIOLIB_PIN_TYPE uint32_t
+
374  #define RADIOLIB_PIN_MODE uint32_t
+
375  #define RADIOLIB_PIN_STATUS uint32_t
+
376  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
377  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
378  #define RADIOLIB_NC (0xFFFFFFFF)
+
379  #define RADIOLIB_DEFAULT_SPI SPI
+
380  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
381  #define RADIOLIB_NONVOLATILE PROGMEM
+
382  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
383  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
384 
+
385  // Arduino API callbacks
+
386  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint32_t dwPin, uint32_t dwMode)
+
387  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t dwPin, uint32_t dwVal)
+
388  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint32_t ulPin)
+
389  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
390  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
391  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (int, attachInterrupt, uint32_t pin, voidFuncPtr callback, uint32_t mode)
+
392  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
+
393  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
394  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t dwMs)
+
395  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t usec)
+
396  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
+
397  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
+
398  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
+
399  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
400  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
401  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
402  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
403  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
404 
+
405  #elif defined(ARDUINO_ARC32_TOOLS)
+
406  // Intel Curie
+
407  #define RADIOLIB_PLATFORM "Intel Curie"
+
408  #define RADIOLIB_PIN_TYPE uint8_t
+
409  #define RADIOLIB_PIN_MODE uint8_t
+
410  #define RADIOLIB_PIN_STATUS uint8_t
+
411  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
412  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
413  #define RADIOLIB_NC (0xFF)
+
414  #define RADIOLIB_DEFAULT_SPI SPI
+
415  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
416  #define RADIOLIB_NONVOLATILE PROGMEM
+
417  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
418  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
419 
+
420  // Arduino API callbacks
+
421  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
422  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t val)
+
423  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
+
424  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, unsigned int frequency, unsigned long duration)
+
425  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
+
426  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint32_t pin, void (*callback)(void), uint32_t mode)
+
427  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint32_t pin)
+
428  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
429  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t dwMs)
+
430  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32_t dwUs)
+
431  #define RADIOLIB_CB_ARGS_MILLIS (uint64_t, millis, void)
+
432  #define RADIOLIB_CB_ARGS_MICROS (uint64_t, micros, void)
+
433  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t pin, uint32_t state, uint32_t timeout)
+
434  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
435  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
436  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
437  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
438  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
439 
+
440  #elif defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY)
+
441  // Arduino megaAVR boards - Uno Wifi Rev.2, Nano Every
+
442  #define RADIOLIB_PLATFORM "Arduino megaAVR"
+
443  #define RADIOLIB_PIN_TYPE uint8_t
+
444  #define RADIOLIB_PIN_MODE PinMode
+
445  #define RADIOLIB_PIN_STATUS PinStatus
+
446  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
447  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
448  #define RADIOLIB_NC (0xFF)
+
449  #define RADIOLIB_DEFAULT_SPI SPI
+
450  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
451  #define RADIOLIB_NONVOLATILE PROGMEM
+
452  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
453  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
454 
+
455  // Arduino API callbacks
+
456  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, PinMode mode)
+
457  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, PinStatus val)
+
458  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, uint8_t pin)
+
459  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
460  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
461  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*userFunc)(void), PinStatus mode)
+
462  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin)
+
463  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
464  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
465  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
466  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
467  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
468  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
469  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
470  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
471  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
472  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
473  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
474 
+
475  #elif defined(ARDUINO_ARCH_APOLLO3)
+
476  // Sparkfun Apollo3 boards
+
477  #define RADIOLIB_PLATFORM "Sparkfun Apollo3"
+
478  #define RADIOLIB_PIN_TYPE pin_size_t
+
479  #define RADIOLIB_PIN_MODE Arduino_PinMode
+
480  #define RADIOLIB_PIN_STATUS PinStatus
+
481  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
482  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
483  #define RADIOLIB_NC (0xFF)
+
484  #define RADIOLIB_DEFAULT_SPI SPI
+
485  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
486  #define RADIOLIB_NONVOLATILE PROGMEM
+
487  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
488  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
489 
+
490  // slow down SX126x/8x SPI on this platform
+
491  #define RADIOLIB_SPI_SLOWDOWN
+
492 
+
493  // Arduino API callbacks
+
494  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pinName, Arduino_PinMode pinMode)
+
495  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pinName, PinStatus val)
+
496  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pinName)
+
497  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
498  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
499  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNumber, voidFuncPtr callback, PinStatus mode)
+
500  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNumber)
+
501  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
502  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
503  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
504  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
505  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
506  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, uint8_t state, unsigned long timeout)
+
507  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
508  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
509  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
510  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
511  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
512 
+
513  #elif defined(ARDUINO_ARDUINO_NANO33BLE)
+
514  // Arduino Nano 33 BLE
+
515  #define RADIOLIB_PLATFORM "Arduino Nano 33 BLE"
+
516  #define RADIOLIB_PIN_TYPE pin_size_t
+
517  #define RADIOLIB_PIN_MODE PinMode
+
518  #define RADIOLIB_PIN_STATUS PinStatus
+
519  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
520  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
521  #define RADIOLIB_NC (0xFF)
+
522  #define RADIOLIB_DEFAULT_SPI SPI
+
523  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
524  #define RADIOLIB_NONVOLATILE PROGMEM
+
525  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
526  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
527 
+
528  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
529  #define RADIOLIB_TONE_UNSUPPORTED
+
530  #define RADIOLIB_MBED_TONE_OVERRIDE
+
531 
+
532  // Arduino API callbacks
+
533  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
+
534  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
+
535  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
+
536  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
537  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
538  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
+
539  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
+
540  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
541  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
542  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
543  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
544  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
545  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, PinStatus state, unsigned long timeout)
+
546  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
547  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
548  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
549  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
550  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
551 
+
552  #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
+
553  // Arduino Portenta H7
+
554  #define RADIOLIB_PLATFORM "Portenta H7"
+
555  #define RADIOLIB_PIN_TYPE pin_size_t
+
556  #define RADIOLIB_PIN_MODE PinMode
+
557  #define RADIOLIB_PIN_STATUS PinStatus
+
558  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
559  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
560  #define RADIOLIB_NC (0xFF)
+
561  #define RADIOLIB_DEFAULT_SPI SPI
+
562  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
563  #define RADIOLIB_NONVOLATILE PROGMEM
+
564  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
565  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
566 
+
567  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
568  #define RADIOLIB_TONE_UNSUPPORTED
+
569  #define RADIOLIB_MBED_TONE_OVERRIDE
+
570 
+
571  // Arduino API callbacks
+
572  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
+
573  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
+
574  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
+
575  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
576  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
577  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
+
578  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
+
579  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
580  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
581  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
582  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
583  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
584  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, PinStatus state, unsigned long timeout)
+
585  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
586  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
587  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
588  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
589  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
590 
+
591  #elif defined(__STM32F4__) || defined(__STM32F1__)
+
592  // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32)
+
593  #define RADIOLIB_PLATFORM "STM32duino (unofficial)"
+
594  #define RADIOLIB_PIN_TYPE uint8_t
+
595  #define RADIOLIB_PIN_MODE WiringPinMode
+
596  #define RADIOLIB_PIN_STATUS uint8_t
+
597  #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode
+
598  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
599  #define RADIOLIB_NC (0xFF)
+
600  #define RADIOLIB_DEFAULT_SPI SPI
+
601  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
602  #define RADIOLIB_NONVOLATILE PROGMEM
+
603  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
604  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
605 
+
606  // Arduino API callbacks
+
607  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8 pin, WiringPinMode mode)
+
608  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8 pin, uint8 val)
+
609  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint32_t, digitalRead, uint8 pin)
+
610  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint32_t _pin, uint32_t frequency, uint32_t duration)
+
611  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint32_t _pin)
+
612  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode)
+
613  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8 pin)
+
614  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
615  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
616  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint32 us)
+
617  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
+
618  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
+
619  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint32_t ulPin, uint32_t ulState, uint32_t ulTimeout)
+
620  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
621  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
622  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
623  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
624  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
625 
+
626  #elif defined(ARDUINO_ARCH_MEGAAVR)
+
627  // MegaCoreX by MCUdude (https://github.com/MCUdude/MegaCoreX)
+
628  #define RADIOLIB_PLATFORM "MegaCoreX"
+
629  #define RADIOLIB_PIN_TYPE uint8_t
+
630  #define RADIOLIB_PIN_MODE uint8_t
+
631  #define RADIOLIB_PIN_STATUS uint8_t
+
632  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
633  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
634  #define RADIOLIB_NC (0xFF)
+
635  #define RADIOLIB_DEFAULT_SPI SPI
+
636  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
637  #define RADIOLIB_NONVOLATILE PROGMEM
+
638  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
639  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
640 
+
641  // Arduino API callbacks
+
642  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
643  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
644  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin)
+
645  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
646  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
647  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin, void (*userFunc)(void), uint8_t mode)
+
648  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
649  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
650  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
651  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
652  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
653  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
654  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
655  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
656  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
657  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
658  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
659  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
660 
+
661  #elif defined(ARDUINO_ARCH_RP2040)
+
662  // Raspberry Pi Pico
+
663  #define RADIOLIB_PLATFORM "Raspberry Pi Pico"
+
664  #define RADIOLIB_PIN_TYPE pin_size_t
+
665  #define RADIOLIB_PIN_MODE PinMode
+
666  #define RADIOLIB_PIN_STATUS PinStatus
+
667  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
668  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
669  #define RADIOLIB_NC (0xFF)
+
670  #define RADIOLIB_DEFAULT_SPI SPI
+
671  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
672  #define RADIOLIB_NONVOLATILE PROGMEM
+
673  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
674  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
675 
+
676  // Arduino mbed OS boards have a really bad tone implementation which will crash after a couple seconds
+
677  #define RADIOLIB_TONE_UNSUPPORTED
+
678  #define RADIOLIB_MBED_TONE_OVERRIDE
+
679 
+
680  // Arduino API callbacks
+
681  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
+
682  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
+
683  #define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
+
684  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
+
685  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
+
686  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
+
687  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
+
688  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
689  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
690  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
691  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
692  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
693  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, PinStatus state, unsigned long timeout)
+
694  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
695  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
696  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
697  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
698  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
699 
+
700  #elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
+
701  // CubeCell
+
702  #define RADIOLIB_PLATFORM "CubeCell"
+
703  #define RADIOLIB_PIN_TYPE uint8_t
+
704  #define RADIOLIB_PIN_MODE PINMODE
+
705  #define RADIOLIB_PIN_STATUS uint8_t
+
706  #define RADIOLIB_INTERRUPT_STATUS IrqModes
+
707  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
708  #define RADIOLIB_NC (0xFF)
+
709  #define RADIOLIB_DEFAULT_SPI SPI
+
710  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
711  #define RADIOLIB_NONVOLATILE PROGMEM
+
712  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
713 
+
714  // Arduino API callbacks
+
715  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, PINMODE mode)
+
716  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin_name, uint8_t level)
+
717  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin_name)
+
718  #define RADIOLIB_CB_ARGS_TONE (void, tone, void)
+
719  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, void)
+
720  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t pin_name, GpioIrqHandler GpioIrqHandlerCallback, IrqModes interrupt_mode)
+
721  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t pin_name)
+
722  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
723  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t milliseconds)
+
724  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, uint16 microseconds)
+
725  #define RADIOLIB_CB_ARGS_MILLIS (uint32_t, millis, void)
+
726  #define RADIOLIB_CB_ARGS_MICROS (uint32_t, micros, void)
+
727  #define RADIOLIB_CB_ARGS_PULSE_IN (uint32_t, pulseIn, uint8_t pin_name, uint8_t mode, uint32_t timeout)
+
728  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
729  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
730  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
731  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
732  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
733 
+
734  // provide an easy access to the on-board module
+
735  #include "board-config.h"
+
736  #define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
+
737 
+
738  // CubeCell doesn't seem to define nullptr, let's do something like that now
+
739  #define nullptr NULL
+
740 
+
741  // ... and also defines pinMode() as a macro, which is by far the stupidest thing I have seen on Arduino
+
742  #undef pinMode
+
743 
+
744  // ... and uses an outdated GCC which does not support type aliases
+
745  #define RADIOLIB_TYPE_ALIAS(type, alias) typedef class type alias;
+
746 
+
747  // ... and it also has no tone(). This platform was designed by an idiot.
+
748  #define RADIOLIB_TONE_UNSUPPORTED
+
749 
+
750  // ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
+
751  #define RADIOLIB_YIELD_UNSUPPORTED
+
752  #if defined(yield)
+
753  #undef yield
+
754  #endif
+
755 
+
756  #elif defined(RASPI)
+
757  // RaspiDuino framework (https://github.com/me-no-dev/RasPiArduino)
+
758  #define RADIOLIB_PLATFORM "RasPiArduino"
+
759  #define RADIOLIB_PIN_TYPE uint8_t
+
760  #define RADIOLIB_PIN_MODE uint8_t
+
761  #define RADIOLIB_PIN_STATUS uint8_t
+
762  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
763  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
764  #define RADIOLIB_NC (0xFF)
+
765  #define RADIOLIB_DEFAULT_SPI SPI
+
766  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
767  #define RADIOLIB_NONVOLATILE PROGMEM
+
768  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
769  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
770 
+
771  // Arduino API callbacks
+
772  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
773  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
774  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
+
775  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
776  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
777  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
+
778  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
779  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
780  #define RADIOLIB_CB_ARGS_DELAY (void, delay, uint32_t ms)
+
781  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
782  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
783  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
784  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
785  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
786  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
787  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
788  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
789  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
790 
+
791  // let's start off easy - no tone on this platform, that can happen
+
792  #define RADIOLIB_TONE_UNSUPPORTED
+
793 
+
794  // hmm, no yield either - weird on something like Raspberry PI, but sure, we can handle it
+
795  #define RADIOLIB_YIELD_UNSUPPORTED
+
796 
+
797  // aight, getting to the juicy stuff - PGM_P seems missing, that's the first time
+
798  #define PGM_P const char *
+
799 
+
800  // ... and for the grand finale, we have millis() and micros() DEFINED AS MACROS!
+
801  #if defined(millis)
+
802  #undef millis
+
803  inline unsigned long millis() { return((unsigned long)(STCV / 1000)); };
+
804  #endif
+
805 
+
806  #if defined(micros)
+
807  #undef micros
+
808  inline unsigned long micros() { return((unsigned long)(STCV)); };
+
809  #endif
+
810 
+
811  #elif defined(TEENSYDUINO)
+
812  // Teensy
+
813  #define RADIOLIB_PLATFORM "Teensy"
+
814  #define RADIOLIB_PIN_TYPE uint8_t
+
815  #define RADIOLIB_PIN_MODE uint8_t
+
816  #define RADIOLIB_PIN_STATUS uint8_t
+
817  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
818  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
819  #define RADIOLIB_NC (0xFF)
+
820  #define RADIOLIB_DEFAULT_SPI SPI
+
821  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
822  #define RADIOLIB_NONVOLATILE PROGMEM
+
823  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
824  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
825 
+
826  // Arduino API callbacks
+
827  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
828  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
829  #define RADIOLIB_CB_ARGS_DIGITAL_READ (uint8_t, digitalRead, uint8_t pin)
+
830  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, short unsigned int frequency, long unsigned int duration)
+
831  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
832  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
+
833  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
834  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
835  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
836  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, long unsigned int us)
+
837  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
838  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
839  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
840  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
841  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
842  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
843  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
844  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
845 
+
846  #else
+
847  // other Arduino platforms not covered by the above list - this may or may not work
+
848  #define RADIOLIB_PLATFORM "Unknown Arduino"
+
849  #define RADIOLIB_UNKNOWN_PLATFORM
+
850  #define RADIOLIB_PIN_TYPE uint8_t
+
851  #define RADIOLIB_PIN_MODE uint8_t
+
852  #define RADIOLIB_PIN_STATUS uint8_t
+
853  #define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
+
854  #define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
+
855  #define RADIOLIB_NC (0xFF)
+
856  #define RADIOLIB_DEFAULT_SPI SPI
+
857  #define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
+
858  #define RADIOLIB_NONVOLATILE PROGMEM
+
859  #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
+
860  #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
+
861 
+
862  // Arduino API callbacks
+
863  #define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, uint8_t pin, uint8_t mode)
+
864  #define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint8_t pin, uint8_t value)
+
865  #define RADIOLIB_CB_ARGS_DIGITAL_READ (int, digitalRead, uint8_t pin)
+
866  #define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t _pin, unsigned int frequency, unsigned long duration)
+
867  #define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t _pin)
+
868  #define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, uint8_t interruptNum, void (*userFunc)(void), int mode)
+
869  #define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, uint8_t interruptNum)
+
870  #define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
+
871  #define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
+
872  #define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
+
873  #define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
+
874  #define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
+
875  #define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, uint8_t pin, uint8_t state, unsigned long timeout)
+
876  #define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
+
877  #define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
+
878  #define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
+
879  #define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
+
880  #define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
+
881 
+
882  #endif
+
883 #endif
+
884 
+
885 #else
+
886  // generic non-Arduino platform
+
887  #define RADIOLIB_PLATFORM "Generic"
+
888 
+
889  // platform properties may be defined here, or somewhere else in the build system
+
890  #include "noarduino.h"
+
891 
+
892 #endif
+
893 
+
894 /*
+
895  * Uncomment to enable debug output.
+
896  * Warning: Debug output will slow down the whole system significantly.
+
897  * Also, it will result in larger compiled binary.
+
898  * Levels: debug - only main info
+
899  * verbose - full transcript of all SPI communication
+
900  */
+
901 #if !defined(RADIOLIB_DEBUG)
+
902  //#define RADIOLIB_DEBUG
+
903 #endif
+
904 #if !defined(RADIOLIB_VERBOSE)
+
905  //#define RADIOLIB_VERBOSE
+
906 #endif
+
907 
+
908 // set which output port should be used for debug output
+
909 // may be Serial port (on Arduino) or file like stdout or stderr (on generic platforms)
+
910 #if !defined(RADIOLIB_DEBUG_PORT)
+
911  #define RADIOLIB_DEBUG_PORT Serial
+
912 #endif
+
913 
+
914 /*
+
915  * Uncomment to enable "paranoid" SPI mode
+
916  * Every write to an SPI register using SPI set function will be verified by a subsequent read operation.
+
917  * This improves reliablility, but slightly slows down communication.
+
918  * Note: Enabled by default.
+
919  */
+
920 #if !defined(RADIOLIB_SPI_PARANOID)
+
921  #define RADIOLIB_SPI_PARANOID
+
922 #endif
+
923 
+
924 /*
+
925  * Uncomment to enable parameter range checking
+
926  * RadioLib will check provided parameters (such as frequency) against limits determined by the device manufacturer.
+
927  * It is highly advised to keep this macro defined, removing it will allow invalid values to be set,
+
928  * possibly leading to bricked module and/or program crashing.
+
929  * Note: Enabled by default.
+
930  */
+
931 #if !defined(RADIOLIB_CHECK_PARAMS)
+
932  #define RADIOLIB_CHECK_PARAMS
+
933 #endif
+
934 
+
935 /*
+
936  * Uncomment to enable SX127x errata fix
+
937  * Warning: SX127x errata fix has been reported to cause issues with LoRa bandwidths lower than 62.5 kHz.
+
938  * It should only be enabled if you really are observing some errata-related issue.
+
939  * Note: Disabled by default.
+
940  */
+
941 #if !defined(RADIOLIB_FIX_ERRATA_SX127X)
+
942  //#define RADIOLIB_FIX_ERRATA_SX127X
+
943 #endif
+
944 
+
945 /*
+
946  * Uncomment to enable god mode - all methods and member variables in all classes will be made public, thus making them accessible from Arduino code.
+
947  * Warning: Come on, it's called GOD mode - obviously only use this if you know what you're doing.
+
948  * Failure to heed the above warning may result in bricked module.
+
949  */
+
950 #if !defined(RADIOLIB_GODMODE)
+
951  //#define RADIOLIB_GODMODE
+
952 #endif
+
953 
+
954 /*
+
955  * Uncomment to enable low-level hardware access
+
956  * This will make some hardware methods like SPI get/set accessible from the user sketch - think of it as "god mode lite"
+
957  * Warning: RadioLib won't stop you from writing invalid stuff into your device, so it's quite easy to brick your module with this.
+
958  */
+
959 #if !defined(RADIOLIB_LOW_LEVEL)
+
960  //#define RADIOLIB_LOW_LEVEL
+
961 #endif
+
962 
+
963 /*
+
964  * Uncomment to enable pre-defined modules when using RadioShield.
+
965  */
+
966 #if !defined(RADIOLIB_RADIOSHIELD)
+
967  //#define RADIOLIB_RADIOSHIELD
+
968 #endif
+
969 
+
970 /*
+
971  * Uncomment to enable static-only memory management: no dynamic allocation will be performed.
+
972  * Warning: Large static arrays will be created in some methods. It is not advised to send large packets in this mode.
+
973  */
+
974 #if !defined(RADIOLIB_STATIC_ONLY)
+
975  //#define RADIOLIB_STATIC_ONLY
+
976 #endif
+
977 
+
978 // set the size of static arrays to use
+
979 #if !defined(RADIOLIB_STATIC_ARRAY_SIZE)
+
980  #define RADIOLIB_STATIC_ARRAY_SIZE (256)
+
981 #endif
+
982 
+
983 #if defined(RADIOLIB_DEBUG)
+
984  #if defined(RADIOLIB_BUILD_ARDUINO)
+
985  #define RADIOLIB_DEBUG_PRINT(...) { RADIOLIB_DEBUG_PORT.print(__VA_ARGS__); }
+
986  #define RADIOLIB_DEBUG_PRINTLN(...) { RADIOLIB_DEBUG_PORT.println(__VA_ARGS__); }
+
987  #else
+
988  #if !defined(RADIOLIB_DEBUG_PRINT)
+
989  #define RADIOLIB_DEBUG_PRINT(...) { frintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__); }
+
990  #endif
+
991  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
992  #define RADIOLIB_DEBUG_PRINTLN(...) { printf(RADIOLIB_DEBUG_PORT, __VA_ARGS__ "\n"); }
+
993  #endif
+
994  #endif
+
995 #else
+
996  #define RADIOLIB_DEBUG_PRINT(...) {}
+
997  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
998 #endif
+
999 
+
1000 #if defined(RADIOLIB_VERBOSE)
+
1001  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
+
1002  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
+
1003 #else
+
1004  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
1005  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
1006 #endif
+
1007 
+
1011 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
1012 
+
1013 /*
+
1014  * Macros that create callback for the hardware abstraction layer.
+
1015  *
+
1016  * This is the most evil thing I have ever created. I am deeply sorry to anyone currently reading this text.
+
1017  * Come one, come all and witness the horror:
+
1018  * Variadics, forced expansions, inlined function, string concatenation, and it even messes up access specifiers.
+
1019  */
+
1020 #define RADIOLIB_FIRST(arg, ...) arg
+
1021 #define RADIOLIB_REST(arg, ...) __VA_ARGS__
+
1022 #define RADIOLIB_EXP(...) __VA_ARGS__
+
1023 
+
1024 #define RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, FUNC, ...) public: typedef RET (*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC = nullptr;
+
1025 #define RADIOLIB_GENERATE_CALLBACK_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_RET_FUNC(RET, __VA_ARGS__)
+
1026 #define RADIOLIB_GENERATE_CALLBACK(CB) RADIOLIB_GENERATE_CALLBACK_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
+
1027 
+
1028 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, FUNC, ...) public: typedef RET (Module::*FUNC##_cb_t)(__VA_ARGS__); void setCb_##FUNC(FUNC##_cb_t cb) { cb_##FUNC = cb; }; private: FUNC##_cb_t cb_##FUNC = nullptr;
+
1029 #define RADIOLIB_GENERATE_CALLBACK_SPI_RET(RET, ...) RADIOLIB_GENERATE_CALLBACK_SPI_RET_FUNC(RET, __VA_ARGS__)
+
1030 #define RADIOLIB_GENERATE_CALLBACK_SPI(CB) RADIOLIB_GENERATE_CALLBACK_SPI_RET(RADIOLIB_EXP(RADIOLIB_FIRST CB), RADIOLIB_EXP(RADIOLIB_REST CB))
+
1031 
+
1035 #if defined(RADIOLIB_CHECK_PARAMS)
+
1036  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
1037 #else
+
1038  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
1039 #endif
+
1040 
+
1041 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
+
1042  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
1043 #else
+
1044  #define RADIOLIB_ERRATA_SX127X(...) {}
+
1045 #endif
+
1046 
+
1047 // version definitions
+
1048 #define RADIOLIB_VERSION_MAJOR (0x05)
+
1049 #define RADIOLIB_VERSION_MINOR (0x03)
+
1050 #define RADIOLIB_VERSION_PATCH (0x00)
+
1051 #define RADIOLIB_VERSION_EXTRA (0x00)
+
1052 
+
1053 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+
1054 
+
1055 #endif
diff --git a/_c_c1101_8h_source.html b/_c_c1101_8h_source.html index affbb668..6c5fbee1 100644 --- a/_c_c1101_8h_source.html +++ b/_c_c1101_8h_source.html @@ -689,60 +689,63 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html',''); initResi
915 
921  int16_t getChipVersion();
922 
-
928  void setDirectAction(void (*func)(void));
-
929 
-
935  void readBit(RADIOLIB_PIN_TYPE pin);
-
936 
-
946  int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value);
-
947 
-
948  #if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
-
949  protected:
-
950  #endif
-
951  Module* _mod;
-
952 
-
953  // SPI read overrides to set bit for burst write and status registers access
-
954  int16_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
-
955  int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb = 7, uint8_t lsb = 0, uint8_t checkInterval = 2);
-
956  void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
-
957  uint8_t SPIreadRegister(uint8_t reg);
-
958  void SPIwriteRegisterBurst(uint8_t reg, uint8_t* data, size_t len);
-
959  void SPIwriteRegister(uint8_t reg, uint8_t data);
-
960 
-
961  void SPIsendCommand(uint8_t cmd);
+
923  #if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
+
924 
+
929  void setDirectAction(void (*func)(void));
+
930 
+
936  void readBit(RADIOLIB_PIN_TYPE pin);
+
937  #endif
+
938 
+
948  int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value);
+
949 
+
950  #if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
+
951  protected:
+
952  #endif
+
953  Module* _mod;
+
954 
+
955  // SPI read overrides to set bit for burst write and status registers access
+
956  int16_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
+
957  int16_t SPIsetRegValue(uint8_t reg, uint8_t value, uint8_t msb = 7, uint8_t lsb = 0, uint8_t checkInterval = 2);
+
958  void SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
+
959  uint8_t SPIreadRegister(uint8_t reg);
+
960  void SPIwriteRegisterBurst(uint8_t reg, uint8_t* data, size_t len);
+
961  void SPIwriteRegister(uint8_t reg, uint8_t data);
962 
-
963  #if !defined(RADIOLIB_GODMODE)
-
964  protected:
-
965  #endif
-
966 
-
967  float _freq = 0;
-
968  float _br = 0;
-
969  uint8_t _rawRSSI = 0;
-
970  uint8_t _rawLQI = 0;
-
971  uint8_t _modulation = RADIOLIB_CC1101_MOD_FORMAT_2_FSK;
-
972 
-
973  size_t _packetLength = 0;
-
974  bool _packetLengthQueried = false;
-
975  uint8_t _packetLengthConfig = RADIOLIB_CC1101_LENGTH_CONFIG_VARIABLE;
-
976 
-
977  bool _promiscuous = false;
-
978  bool _crcOn = true;
-
979  bool _directMode = true;
-
980 
-
981  uint8_t _syncWordLength = 2;
-
982  int8_t _power = 0;
-
983 
-
984  int16_t config();
-
985  int16_t transmitDirect(bool sync, uint32_t frf);
-
986  int16_t receiveDirect(bool sync);
-
987  int16_t directMode(bool sync);
-
988  static void getExpMant(float target, uint16_t mantOffset, uint8_t divExp, uint8_t expMax, uint8_t& exp, uint8_t& mant);
-
989  int16_t setPacketMode(uint8_t mode, uint16_t len);
-
990 };
-
991 
-
992 #endif
+
963  void SPIsendCommand(uint8_t cmd);
+
964 
+
965  #if !defined(RADIOLIB_GODMODE)
+
966  protected:
+
967  #endif
+
968 
+
969  float _freq = 0;
+
970  float _br = 0;
+
971  uint8_t _rawRSSI = 0;
+
972  uint8_t _rawLQI = 0;
+
973  uint8_t _modulation = RADIOLIB_CC1101_MOD_FORMAT_2_FSK;
+
974 
+
975  size_t _packetLength = 0;
+
976  bool _packetLengthQueried = false;
+
977  uint8_t _packetLengthConfig = RADIOLIB_CC1101_LENGTH_CONFIG_VARIABLE;
+
978 
+
979  bool _promiscuous = false;
+
980  bool _crcOn = true;
+
981  bool _directMode = true;
+
982 
+
983  uint8_t _syncWordLength = 2;
+
984  int8_t _power = 0;
+
985 
+
986  int16_t config();
+
987  int16_t transmitDirect(bool sync, uint32_t frf);
+
988  int16_t receiveDirect(bool sync);
+
989  int16_t directMode(bool sync);
+
990  static void getExpMant(float target, uint16_t mantOffset, uint8_t divExp, uint8_t expMax, uint8_t& exp, uint8_t& mant);
+
991  int16_t setPacketMode(uint8_t mode, uint16_t len);
+
992 };
+
993 
+
994 #endif
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
int16_t disableSyncWordFiltering(bool requireCarrierSense=false)
Disable preamble and sync word filtering and generation.
Definition: CC1101.cpp:776
int16_t begin(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=135.0, int8_t power=10, uint8_t preambleLength=16)
Initialization method.
Definition: CC1101.cpp:12
int16_t startReceive()
Interrupt-driven receive method. GDO0 will be activated when full packet is received.
Definition: CC1101.cpp:331
@@ -750,17 +753,17 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html',''); initResi
uint8_t getLQI() const
Gets LQI (Link Quality Indicator) of the last received packet.
Definition: CC1101.cpp:737
void clearGdo0Action()
Clears interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:238
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: CC1101.cpp:257
-
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: CC1101.cpp:893
+
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: CC1101.cpp:894
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: CC1101.cpp:102
int16_t transmitDirectAsync(uint32_t frf=0)
Starts asynchronous direct mode transmission.
Definition: CC1101.cpp:180
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm.
Definition: CC1101.cpp:521
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER,...
Definition: CC1101.cpp:841
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
int16_t receiveDirectAsync()
Starts asynchronous direct mode reception.
Definition: CC1101.cpp:210
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: CC1101.cpp:352
void setGdo2Action(void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
Sets interrupt service routine to call when GDO2 activates.
Definition: CC1101.cpp:242
bool getPromiscuousMode()
Get whether the modem is in promiscuous mode: no packet filtering (e.g., no preamble,...
Definition: CC1101.cpp:818
-
int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: CC1101.cpp:901
+
int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: CC1101.cpp:903
void clearGdo2Action()
Clears interrupt service routine to call when GDO0 activates.
Definition: CC1101.cpp:250
int16_t setSyncWord(uint8_t syncH, uint8_t syncL, uint8_t maxErrBits=0, bool requireCarrierSense=false)
Sets 16-bit sync word as a two byte value.
Definition: CC1101.cpp:622
int16_t getChipVersion()
Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14...
Definition: CC1101.cpp:889
@@ -772,7 +775,7 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html',''); initResi
int16_t fixedPacketLengthMode(uint8_t len=RADIOLIB_CC1101_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: CC1101.cpp:755
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
int16_t standby() override
Sets the module to standby mode.
Definition: CC1101.cpp:167
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed value is RADI...
Definition: CC1101.cpp:822
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values range from 58.0 to 812.0 kHz.
Definition: CC1101.cpp:478
int16_t setBitRate(float br)
Sets bit rate. Allowed values range from 0.025 to 600.0 kbps.
Definition: CC1101.cpp:458
@@ -781,7 +784,7 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html',''); initResi
int16_t setPreambleLength(uint8_t preambleLength)
Sets preamble length.
Definition: CC1101.cpp:627
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: CC1101.cpp:143
-
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: CC1101.cpp:897
+
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: CC1101.cpp:898
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: CC1101.cpp:714
int16_t receiveDirect() override
Starts direct mode reception.
Definition: CC1101.cpp:206
int16_t enableSyncWordFiltering(uint8_t maxErrBits=0, bool requireCarrierSense=false)
Enable sync word filtering and generation.
Definition: CC1101.cpp:763
@@ -793,7 +796,7 @@ $(document).ready(function(){initNavTree('_c_c1101_8h_source.html',''); initResi
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: CC1101.cpp:780
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: CC1101.cpp:176
CC1101(Module *module)
Default constructor.
Definition: CC1101.cpp:4
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
virtual int16_t standby()=0
Sets module to standby.
virtual int16_t setFrequencyDeviation(float freqDev)=0
Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and mu...
Client for Hellschreiber transmissions.
Definition: Hellschreiber.h:89
virtual int16_t setEncoding(uint8_t encoding)=0
Sets FSK data encoding. Only available in FSK mode. Must be implemented in module class.
virtual int16_t transmitDirect(uint32_t frf=0)=0
Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module ...
-
int16_t available()
Get the number of direct mode bytes currently available in buffer.
Definition: PhysicalLayer.cpp:191
+
int16_t available()
Get the number of direct mode bytes currently available in buffer.
Definition: PhysicalLayer.cpp:194
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:17
Client for AX25 communication.
Definition: AX25.h:279
virtual void setDirectAction(void(*func)(void))=0
Set interrupt service routine function to call when data bit is receveid in direct mode....
virtual void readBit(RADIOLIB_PIN_TYPE pin)=0
Function to read and process data bit in direct reception mode. Must be implemented in module class.
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
virtual int16_t receiveDirect()=0
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module cla...
-
uint8_t read()
Get data from direct mode buffer.
Definition: PhysicalLayer.cpp:195
+
uint8_t read()
Get data from direct mode buffer.
Definition: PhysicalLayer.cpp:198
PhysicalLayer(float freqStep, size_t maxPacketLength)
Default constructor.
Definition: PhysicalLayer.cpp:3
-
int16_t startDirect()
Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX....
Definition: PhysicalLayer.cpp:177
+
int16_t startDirect()
Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX....
Definition: PhysicalLayer.cpp:179
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition: Morse.h:93
virtual uint8_t randomByte()=0
Get one truly random byte from RSSI noise. Must be implemented in module class.
-
int32_t random(int32_t max)
Get truly random number in range 0 - max.
Definition: PhysicalLayer.cpp:149
-
virtual int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: PhysicalLayer.cpp:250
+
int32_t random(int32_t max)
Get truly random number in range 0 - max.
Definition: PhysicalLayer.cpp:151
+
virtual int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: PhysicalLayer.cpp:254
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition: RTTY.h:88
virtual size_t getPacketLength(bool update=true)=0
Query modem for the packet length of received payload. Must be implemented in module class.
Client for SSTV transmissions.
Definition: SSTV.h:120
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
-
int16_t setDirectSyncWord(uint32_t syncWord, uint8_t len)
Set sync word to be used to determine start of packet in direct reception mode.
Definition: PhysicalLayer.cpp:204
+
int16_t setDirectSyncWord(uint32_t syncWord, uint8_t len)
Set sync word to be used to determine start of packet in direct reception mode.
Definition: PhysicalLayer.cpp:207
Client for FSK-4 communication. The public interface is the same as Arduino Serial.
Definition: FSK4.h:16
-
float getFreqStep() const
Gets the module frequency step size that was set in constructor.
Definition: PhysicalLayer.cpp:145
+
float getFreqStep() const
Gets the module frequency step size that was set in constructor.
Definition: PhysicalLayer.cpp:147
virtual int16_t setDataShaping(uint8_t sh)=0
Sets GFSK data shaping. Only available in FSK mode. Must be implemented in module class.
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: RF69.cpp:791
void setDio0Action(void(*func)(void))
Sets interrupt service routine to call when DIO0 activates.
Definition: RF69.cpp:277
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: RF69.cpp:293
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets broadcast address. Calling this method will also enable address filtering for node and broadcast...
Definition: RF69.cpp:692
int16_t receiveDirect() override
Starts direct mode reception.
Definition: RF69.cpp:204
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: RF69.cpp:875
-
int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: RF69.cpp:906
+
int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: RF69.cpp:908
int16_t setOokFixedThreshold(uint8_t value)
Fixed threshold for the Data Slicer in OOK mode or floor threshold for the Data Slicer in OOK when Pe...
Definition: RF69.cpp:508
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: RF69.cpp:445
int16_t setPromiscuousMode(bool promiscuous=true)
Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address,...
Definition: RF69.cpp:799
@@ -764,7 +767,7 @@ $(document).ready(function(){initNavTree('_r_f69_8h_source.html',''); initResiza
bool fifoAdd(uint8_t *data, int totalLen, volatile int *remLen)
Set interrupt service routine function to call when FIFO is empty.
Definition: RF69.cpp:329
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: RF69.cpp:114
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values are 2.6, 3.1, 3.9, 5.2, 6.3, 7.8, 10.4, 12....
Definition: RF69.cpp:559
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
int16_t setBitRate(float br)
Sets bit rate. Allowed values range from 1.2 to 300.0 kbps.
Definition: RF69.cpp:538
int16_t disableAES()
Disables AES encryption.
Definition: RF69.cpp:245
RF69(Module *module)
Default constructor.
Definition: RF69.cpp:4
@@ -781,16 +784,16 @@ $(document).ready(function(){initNavTree('_r_f69_8h_source.html',''); initResiza
int16_t setFrequencyDeviation(float freqDev) override
Sets frequency deviation.
Definition: RF69.cpp:587
int16_t disableAddressFiltering()
Disables address filtering. Calling this method will also erase previously set addresses.
Definition: RF69.cpp:701
int16_t setSyncWord(uint8_t *syncWord, size_t len, uint8_t maxErrBits=0)
Sets sync word. Up to 8 bytes can be set as sync word.
Definition: RF69.cpp:649
-
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: RF69.cpp:902
+
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: RF69.cpp:903
void setFifoEmptyAction(void(*func)(void))
Set interrupt service routine function to call when FIFO is empty.
Definition: RF69.cpp:300
int16_t disableSyncWordFiltering()
Disable preamble and sync word filtering and generation.
Definition: RF69.cpp:761
float getRSSI()
Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
Definition: RF69.cpp:871
int16_t fixedPacketLengthMode(uint8_t len=RADIOLIB_RF69_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: RF69.cpp:748
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER an...
Definition: RF69.cpp:845
void setAESKey(uint8_t *key)
Sets AES key.
Definition: RF69.cpp:237
-
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: RF69.cpp:898
+
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: RF69.cpp:899
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: RF69.cpp:183
int16_t setOutputPower(int8_t power, bool highPower=false)
Sets output power. Allowed values range from -18 to 13 dBm for low power modules (RF69C/CW) or -2 to ...
Definition: RF69.cpp:611
@@ -799,10 +802,10 @@ $(document).ready(function(){initNavTree('_r_f69_8h_source.html',''); initResiza
void setAmbientTemperature(int16_t tempAmbient)
Sets ambient temperature. Required to correct values from on-board temperature sensor.
Definition: RF69.cpp:714
int16_t setOokThresholdType(uint8_t type)
Selects the type of threshold in the OOK data slicer.
Definition: RF69.cpp:501
int16_t sleep()
Sets the module to sleep mode.
Definition: RF69.cpp:167
-
int16_t getChipVersion()
Read version SPI register. Should return RF69_CHIP_VERSION (0x24) if SX127x is connected and working.
Definition: RF69.cpp:916
+
int16_t getChipVersion()
Read version SPI register. Should return RF69_CHIP_VERSION (0x24) if SX127x is connected and working.
Definition: RF69.cpp:920
int16_t enableSyncWordFiltering(uint8_t maxErrBits=0)
Enable sync word filtering and generation.
Definition: RF69.cpp:756
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: RF69.cpp:387
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53
int16_t variablePacketLengthMode(uint8_t maxLen=RADIOLIB_SX126X_MAX_PACKET_LENGTH)
Set modem in variable packet length mode. Available in FSK mode only.
Definition: SX126x.cpp:1124
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: SX126x.cpp:192
uint32_t getTimeOnAir(size_t len)
Get expected time-on-air for a given size of payload.
Definition: SX126x.cpp:1128
int16_t setBandwidth(float bw)
Sets LoRa bandwidth. Allowed values are 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125....
Definition: SX126x.cpp:631
@@ -676,7 +680,7 @@ $(document).ready(function(){initNavTree('_s_x126x_8h_source.html',''); initResi
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: SX126x.cpp:251
float getCurrentLimit()
Reads current protection limit.
Definition: SX126x.cpp:732
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX126x.cpp:378
-
uint16_t getIrqStatus()
Reads the current IRQ status.
Definition: SX126x.cpp:1353
+
uint16_t getIrqStatus()
Reads the current IRQ status.
Definition: SX126x.cpp:1355
int16_t setSyncWord(uint8_t syncWord, uint8_t controlBits=0x44)
Sets LoRa sync word.
Definition: SX126x.cpp:708
int16_t startReceive(uint32_t timeout=RADIOLIB_SX126X_RX_TIMEOUT_INF)
Interrupt-driven receive method. DIO1 will be activated when full packet is received.
Definition: SX126x.cpp:443
int16_t setRegulatorDCDC()
Set regulator mode to DC-DC.
Definition: SX126x.cpp:1182
@@ -688,7 +692,7 @@ $(document).ready(function(){initNavTree('_s_x126x_8h_source.html',''); initResi
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX126x.cpp:1113
float getRSSIInst()
Get instantaneous RSSI value during recption of the packet. Should switch to FSK receive mode for LBT...
Definition: SX126x.cpp:1163
int16_t fixedPacketLengthMode(uint8_t len=RADIOLIB_SX126X_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode. Available in FSK mode only.
Definition: SX126x.cpp:1120
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
int16_t beginFSK(float br, float freqDev, float rxBw, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX126x.cpp:78
SX126x(Module *mod)
Default constructor.
Definition: SX126x.cpp:4
int16_t setWhitening(bool enabled, uint16_t initial=0x0100)
Sets FSK whitening parameters.
Definition: SX126x.cpp:1049
@@ -700,7 +704,7 @@ $(document).ready(function(){initNavTree('_s_x126x_8h_source.html',''); initResi
float getDataRate() const
Gets effective data rate for the last transmitted packet. The value is calculated only for payload by...
Definition: SX126x.cpp:1086
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method,...
Definition: SX126x.cpp:1206
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: SX126x.cpp:374
-
int16_t setTCXO(float voltage, uint32_t delay=5000)
Sets TCXO (Temperature Compensated Crystal Oscillator) configuration.
Definition: SX126x.cpp:1248
+
int16_t setTCXO(float voltage, uint32_t delay=5000)
Sets TCXO (Temperature Compensated Crystal Oscillator) configuration.
Definition: SX126x.cpp:1250
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in ...
Definition: SX126x.cpp:382
int16_t setCRC(uint8_t len, uint16_t initial=0x1D0F, uint16_t polynomial=0x1021, bool inverted=true)
Sets CRC configuration.
Definition: SX126x.cpp:990
int16_t getChannelScanResult()
Read the channel scan result.
Definition: SX126x.cpp:610
@@ -708,22 +712,22 @@ $(document).ready(function(){initNavTree('_s_x126x_8h_source.html',''); initResi
int16_t startChannelScan()
Interrupt-driven channel activity detection method. DIO0 will be activated when LoRa preamble is dete...
Definition: SX126x.cpp:584
uint8_t randomByte()
Get one truly random byte from RSSI noise.
Definition: SX126x.cpp:1215
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
int16_t setCodingRate(uint8_t cr)
Sets LoRa coding rate denominator. Allowed values range from 5 to 8.
Definition: SX126x.cpp:695
int16_t startReceiveDutyCycleAuto(uint16_t senderPreambleLength=0, uint16_t minSymbols=8)
Calls startReceiveDutyCycle with rxPeriod and sleepPeriod set so the unit shouldn't miss any messages...
Definition: SX126x.cpp:483
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation. Allowed values range from 0.0 to 200.0 kHz.
Definition: SX126x.cpp:754
int16_t receiveDirect() override
Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX126x series does...
Definition: SX126x.cpp:324
-
int16_t setDio2AsRfSwitch(bool enable=true)
Set DIO2 to function as RF switch (default in Semtech example designs).
Definition: SX126x.cpp:1296
+
int16_t setDio2AsRfSwitch(bool enable=true)
Set DIO2 to function as RF switch (default in Semtech example designs).
Definition: SX126x.cpp:1298
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Available in FSK mode only. Serves only as alias for PhysicalLayer compat...
Definition: SX126x.cpp:1186
-
void readBit(RADIOLIB_PIN_TYPE pin)
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX126x.cpp:1242
-
void setDirectAction(void(*func)(void))
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX126x.cpp:1236
+
void readBit(RADIOLIB_PIN_TYPE pin)
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX126x.cpp:1243
+
void setDirectAction(void(*func)(void))
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX126x.cpp:1237
float getSNR()
Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem.
Definition: SX126x.cpp:1097
int16_t standby() override
Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator)...
Definition: SX126x.cpp:362
int16_t transmitDirect(uint32_t frf=0) override
Starts direct mode transmission.
Definition: SX126x.cpp:308
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:362
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 0.6 to 300.0 kbps.
Definition: SX126x.cpp:781
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53
int16_t setBroadcastAddress(uint8_t broadAddr)
Sets broadcast address. Calling this method will also enable address filtering for node and broadcast...
Definition: SX126x.cpp:962
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
-
int16_t setDIOPreambleDetect(bool usePreambleDetect)
Configure DIO mapping to use RSSI or Preamble Detect for pins that support it.
Definition: SX127x.cpp:1535
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
+
int16_t setDIOPreambleDetect(bool usePreambleDetect)
Configure DIO mapping to use RSSI or Preamble Detect for pins that support it.
Definition: SX127x.cpp:1537
int16_t setNodeAddress(uint8_t nodeAddr)
Sets FSK node address. Calling this method will enable address filtering. Only available in FSK mode.
Definition: SX127x.cpp:969
int8_t getTempRaw()
Reads uncalibrated temperature value. This function will change operating mode and should not be call...
Definition: SX127x.cpp:1287
int16_t startReceive(uint8_t len=0, uint8_t mode=RADIOLIB_SX127X_RXCONTINUOUS)
Interrupt-driven receive method. DIO0 will be activated when full valid packet is received.
Definition: SX127x.cpp:356
-
void clearFHSSInt(void)
Clear the FHSS interrupt.
Definition: SX127x.cpp:1516
+
void clearFHSSInt(void)
Clear the FHSS interrupt.
Definition: SX127x.cpp:1518
void setFifoEmptyAction(void(*func)(void))
Set interrupt service routine function to call when FIFO is empty.
Definition: SX127x.cpp:432
int16_t invertIQ(bool invertIQ)
Enables/disables Invert the LoRa I and Q signals.
Definition: SX127x.cpp:1476
int16_t setAFCAGCTrigger(uint8_t trigger)
Controls trigger of AFC and AGC.
Definition: SX127x.cpp:935
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ,...
Definition: SX127x.cpp:1210
void setDio1Action(void(*func)(void))
Set interrupt service routine function to call when DIO1 activates.
Definition: SX127x.cpp:418
-
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: SX127x.cpp:1500
+
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: SX127x.cpp:1501
int16_t enableBitSync()
Enable Bit synchronizer.
Definition: SX127x.cpp:1047
-
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: SX127x.cpp:1496
+
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: SX127x.cpp:1497
int16_t sleep()
Sets the LoRa module to sleep to save power. Module will not be able to transmit or receive any data ...
Definition: SX127x.cpp:265
int16_t readData(uint8_t *data, size_t len) override
Reads data that was received after calling startReceive method. This method reads len characters.
Definition: SX127x.cpp:591
int16_t variablePacketLengthMode(uint8_t maxLen=RADIOLIB_SX127X_MAX_PACKET_LENGTH_FSK)
Set modem in variable packet length mode. Available in FSK mode only.
Definition: SX127x.cpp:1127
@@ -895,7 +898,7 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
int16_t setOokPeakThresholdStep(uint8_t value)
Size of each decrement of the RSSI threshold in the OOK demodulator.
Definition: SX127x.cpp:1039
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition: SX127x.cpp:425
int16_t setSyncWord(uint8_t syncWord)
Sets LoRa sync word. Only available in LoRa mode.
Definition: SX127x.cpp:672
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
int16_t beginFSK(uint8_t chipVersion, float br, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK init...
Definition: SX127x.cpp:59
int16_t receiveDirect() override
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). While in direct mode,...
Definition: SX127x.cpp:310
void setDio0Action(void(*func)(void))
Set interrupt service routine function to call when DIO0 activates.
Definition: SX127x.cpp:410
@@ -924,7 +927,7 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
int16_t setPreambleLength(uint16_t preambleLength)
Sets LoRa or FSK preamble length. Allowed values range from 6 to 65535 in LoRa mode or 0 to 65535 in ...
Definition: SX127x.cpp:709
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 1.2 to 300 kbps. Only available in FSK mode.
Definition: SX127x.cpp:822
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
void clearDio0Action()
Clears interrupt service routine to call when DIO0 activates.
Definition: SX127x.cpp:414
uint16_t getIRQFlags()
Reads currently active IRQ flags, can be used to check which event caused an interrupt....
Definition: SX127x.cpp:1229
int16_t setOokPeakThresholdDecrement(uint8_t value)
Period of decrement of the RSSI threshold in the OOK demodulator.
Definition: SX127x.cpp:1031
@@ -932,13 +935,13 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
int16_t setOokThresholdType(uint8_t type)
Selects the type of threshold in the OOK data slicer.
Definition: SX127x.cpp:1015
int16_t setAFCBandwidth(float afcBw)
Sets FSK automatic frequency correction bandwidth. Allowed values range from 2.6 to 250 kHz....
Definition: SX127x.cpp:909
int16_t setOOK(bool enableOOK)
Enables/disables OOK modulation instead of FSK.
Definition: SX127x.cpp:1055
-
int16_t setFHSSHoppingPeriod(uint8_t freqHoppingPeriod)
Sets the hopping period and enables FHSS.
Definition: SX127x.cpp:1504
+
int16_t setFHSSHoppingPeriod(uint8_t freqHoppingPeriod)
Sets the hopping period and enables FHSS.
Definition: SX127x.cpp:1506
int16_t setRxBandwidth(float rxBw)
Sets FSK receiver bandwidth. Allowed values range from 2.6 to 250 kHz. Only available in FSK mode.
Definition: SX127x.cpp:893
void clearFifoFullAction()
Clears interrupt service routine to call when FIFO is full.
Definition: SX127x.cpp:450
-
int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: SX127x.cpp:1525
+
int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value)
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition: SX127x.cpp:1527
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
int16_t scanChannel()
Performs scan for valid LoRa preamble in the current channel.
Definition: SX127x.cpp:245
-
uint8_t getFHSSHoppingPeriod(void)
Gets FHSS hopping period.
Definition: SX127x.cpp:1508
+
uint8_t getFHSSHoppingPeriod(void)
Gets FHSS hopping period.
Definition: SX127x.cpp:1510
int16_t receive(uint8_t *data, size_t len) override
Binary receive method. Will attempt to receive arbitrary binary data up to 255 bytes long using LoRa ...
Definition: SX127x.cpp:200
int16_t getChipVersion()
Read version SPI register. Should return SX1278_CHIP_VERSION (0x12) or SX1272_CHIP_VERSION (0x22) if ...
Definition: SX127x.cpp:1283
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: SX127x.cpp:1177
@@ -947,9 +950,9 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
int16_t packetMode()
Disables direct mode and enables packet mode, allowing the module to receive packets....
Definition: SX127x.cpp:347
int16_t setCurrentLimit(uint8_t currentLimit)
Sets current limit for over current protection at transmitter amplifier. Allowed values range from 45...
Definition: SX127x.cpp:685
float getFrequencyError(bool autoCorrect=false)
Gets frequency error of the latest received packet.
Definition: SX127x.cpp:738
-
uint8_t getFHSSChannel(void)
Gets the FHSS channel in use.
Definition: SX127x.cpp:1512
+
uint8_t getFHSSChannel(void)
Gets the FHSS channel in use.
Definition: SX127x.cpp:1514
void setFifoFullAction(void(*func)(void))
Set interrupt service routine function to call when FIFO is full.
Definition: SX127x.cpp:441
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53
int16_t beginBLE(float freq=2400.0, uint16_t br=800, float freqDev=400.0, int8_t power=10, uint8_t dataShaping=RADIOLIB_SHAPING_0_5)
Initialization method for BLE modem.
Definition: SX128x.cpp:130
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: SX128x.cpp:558
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
int16_t begin(float freq=2400.0, float bw=812.5, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX128X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=12)
Initialization method for LoRa modem.
Definition: SX128x.cpp:12
Base class for SX128x series. All derived classes for SX128x (e.g. SX1280 or SX1281) inherit from thi...
Definition: SX128x.h:350
int16_t setSyncWord(uint8_t *syncWord, uint8_t len)
Sets FSK/FLRC sync word in the form of array of up to 5 bytes (FSK). For FLRC modem,...
Definition: SX128x.cpp:869
@@ -627,12 +630,12 @@ $(document).ready(function(){initNavTree('_s_x128x_8h_source.html',''); initResi
int16_t standby() override
Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator)...
Definition: SX128x.cpp:441
int16_t receiveDirect() override
Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as SX128x series does...
Definition: SX128x.cpp:372
int16_t setAccessAddress(uint32_t addr)
Sets BLE access address.
Definition: SX128x.cpp:1012
-
void readBit(RADIOLIB_PIN_TYPE pin)
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX128x.cpp:1252
-
void setDirectAction(void(*func)(void))
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX128x.cpp:1246
+
void readBit(RADIOLIB_PIN_TYPE pin)
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX128x.cpp:1253
+
void setDirectAction(void(*func)(void))
Dummy method, to ensure PhysicalLayer compatibility.
Definition: SX128x.cpp:1247
int16_t setDataShaping(uint8_t sh) override
Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPI...
Definition: SX128x.cpp:839
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: SX128x.cpp:319
#define RADIOLIB_SHAPING_0_5
Gaussin shaping filter, BT = 0.5.
Definition: TypeDef.h:25
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
int16_t setHighSensitivityMode(bool hsm=false)
Enables or disables receiver high sensitivity mode.
Definition: SX128x.cpp:1023
int16_t setGainControl(uint8_t gain=0)
Enables or disables receiver manual gain control.
Definition: SX128x.cpp:1040
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in range from 2400.0 to 2500.0 MHz.
Definition: SX128x.cpp:595
@@ -654,7 +657,7 @@ $(document).ready(function(){initNavTree('_s_x128x_8h_source.html',''); initResi
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: SX128x.cpp:271
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: SX128x.cpp:1153
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
float getFrequencyError()
Gets frequency error of the latest received packet.
Definition: SX128x.cpp:1120
uint32_t getTimeOnAir(size_t len)
Get expected time-on-air for a given size of payload.
Definition: SX128x.cpp:1160
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
@@ -666,7 +669,7 @@ $(document).ready(function(){initNavTree('_s_x128x_8h_source.html',''); initResi
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission.
Definition: SX128x.cpp:1224
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: SX128x.cpp:1236
float getSNR()
Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa or ranging mode...
Definition: SX128x.cpp:1100
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53
int16_t reset(bool verify=true)
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX128x.cpp:238
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
int16_t receiveDirect() override
Enables direct reception mode. While in direct mode, the module will not be able to transmit or recei...
Definition: Si443x.cpp:192
int16_t standby() override
Sets the module to standby.
Definition: Si443x.cpp:143
int16_t setBitRate(float br)
Sets FSK bit rate. Allowed values range from 0.123 to 256.0 kbps.
Definition: Si443x.cpp:320
int16_t setPreambleLength(uint8_t preambleLen)
Sets preamble length.
Definition: Si443x.cpp:498
-
int16_t variablePacketLengthMode(uint8_t maxLen=RADIOLIB_SI443X_MAX_PACKET_LENGTH)
Set modem in variable packet length mode.
Definition: Si443x.cpp:604
+
int16_t variablePacketLengthMode(uint8_t maxLen=RADIOLIB_SI443X_MAX_PACKET_LENGTH)
Set modem in variable packet length mode.
Definition: Si443x.cpp:606
int16_t packetMode()
Disables direct mode and enables packet mode, allowing the module to receive packets.
Definition: Si443x.cpp:205
int16_t setRxBandwidth(float rxBw)
Sets receiver bandwidth. Allowed values range from 2.6 to 620.7 kHz.
Definition: Si443x.cpp:374
int16_t begin(float br, float freqDev, float rxBw, uint8_t preambleLen)
Initialization method.
Definition: Si443x.cpp:12
@@ -760,7 +763,7 @@ $(document).ready(function(){initNavTree('_si443x_8h_source.html',''); initResiz
void setIrqAction(void(*func)(void))
Sets interrupt service routine to call when IRQ activates.
Definition: Si443x.cpp:212
int16_t sleep()
Sets the module to sleep to save power. Module will not be able to transmit or receive any data while...
Definition: Si443x.cpp:127
int16_t readData(uint8_t *data, size_t len) override
Reads data that was received after calling startReceive method. This method reads len characters.
Definition: Si443x.cpp:286
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
uint8_t randomByte()
Get one truly random byte from RSSI noise.
Definition: Si443x.cpp:569
void clearIrqAction()
Clears interrupt service routine to call when IRQ activates.
Definition: Si443x.cpp:216
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr=0) override
Interrupt-driven binary transmit method. Will start transmitting arbitrary binary data up to 64 bytes...
Definition: Si443x.cpp:220
@@ -768,22 +771,22 @@ $(document).ready(function(){initNavTree('_si443x_8h_source.html',''); initResiz
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition: Si443x.cpp:546
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
Some modules contain external RF switch controlled by two pins. This function gives RadioLib control ...
Definition: Si443x.cpp:565
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
int16_t setEncoding(uint8_t encoding) override
Sets transmission encoding. Only available in FSK mode. Allowed values are RADIOLIB_ENCODING_NRZ,...
Definition: Si443x.cpp:527
void reset()
Reset method. Will reset the chip to the default state using SDN pin.
Definition: Si443x.cpp:69
-
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: Si443x.cpp:596
+
void readBit(RADIOLIB_PIN_TYPE pin)
Function to read and process data bit in direct reception mode.
Definition: Si443x.cpp:597
int16_t setSyncWord(uint8_t *syncWord, size_t len)
Sets sync word. Up to 4 bytes can be set as sync word.
Definition: Si443x.cpp:481
Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from thi...
Definition: Si443x.h:554
-
int16_t fixedPacketLengthMode(uint8_t len=RADIOLIB_SI443X_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: Si443x.cpp:600
+
int16_t fixedPacketLengthMode(uint8_t len=RADIOLIB_SI443X_MAX_PACKET_LENGTH)
Set modem in fixed packet length mode.
Definition: Si443x.cpp:602
int16_t setFrequencyDeviation(float freqDev) override
Sets FSK frequency deviation from carrier frequency. Allowed values range from 0.625 to 320....
Definition: Si443x.cpp:351
-
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: Si443x.cpp:592
+
void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is receveid in direct mode.
Definition: Si443x.cpp:593
int16_t receive(uint8_t *data, size_t len) override
Binary receive method. Will attempt to receive arbitrary binary data up to 64 bytes long....
Definition: Si443x.cpp:105
int16_t transmit(uint8_t *data, size_t len, uint8_t addr=0) override
Binary transmit method. Will transmit arbitrary binary data up to 64 bytes long. For overloads to tra...
Definition: Si443x.cpp:77
Si443x(Module *mod)
Default constructor.
Definition: Si443x.cpp:4
int16_t startReceive()
Interrupt-driven receive method. IRQ will be activated when full valid packet is received.
Definition: Si443x.cpp:261
int16_t transmitDirect(uint32_t frf=0) override
Enables direct transmission mode. While in direct mode, the module will not be able to transmit or re...
Definition: Si443x.cpp:150
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53
int16_t receive(uint8_t *data, size_t len) override
Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalL...
Definition: nRF24.cpp:115
-
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:10
+
int16_t transmit(__FlashStringHelper *fstr, uint8_t addr=0)
Arduino Flash String transmit method.
Definition: PhysicalLayer.cpp:12
int16_t setDataRate(int16_t dataRate)
Sets data rate. Allowed values are 2000, 1000 or 250 kbps.
Definition: nRF24.cpp:257
uint8_t randomByte()
Dummy random method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:513
int16_t setDataShaping(uint8_t sh) override
Dummy data shaping configuration method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:499
int16_t setCrcFiltering(bool crcOn=true)
Enable CRC filtering and generation.
Definition: nRF24.cpp:459
size_t getPacketLength(bool update=true) override
Query modem for the packet length of received payload.
Definition: nRF24.cpp:452
int16_t setTransmitPipe(uint8_t *addr)
Sets address of transmit pipe. The address width must be the same as the same as the configured in se...
Definition: nRF24.cpp:339
-
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:59
-
void readBit(RADIOLIB_PIN_TYPE pin)
Dummy method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:525
+
int16_t readData(String &str, size_t len=0)
Reads data that was received after calling startReceive method.
Definition: PhysicalLayer.cpp:61
+
void readBit(RADIOLIB_PIN_TYPE pin)
Dummy method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:526
void setIrqAction(void(*func)(void))
Sets interrupt service routine to call when IRQ activates.
Definition: nRF24.cpp:158
int16_t startTransmit(uint8_t *data, size_t len, uint8_t addr) override
Interrupt-driven binary transmit method. IRQ will be activated when full packet is transmitted....
Definition: nRF24.cpp:162
bool isCarrierDetected()
Checks if carrier was detected during last RX.
Definition: nRF24.cpp:441
@@ -378,12 +381,12 @@ $(document).ready(function(){initNavTree('n_r_f24_8h_source.html',''); initResiz
int16_t setFrequencyDeviation(float freqDev) override
Dummy configuration method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:445
int16_t startReceive()
Interrupt-driven receive method. IRQ will be activated when full packet is received.
Definition: nRF24.cpp:202
int16_t transmit(uint8_t *data, size_t len, uint8_t addr) override
Blocking binary transmit method. Overloads for string-based transmissions are implemented in Physical...
Definition: nRF24.cpp:84
-
void setDirectAction(void(*func)(void))
Dummy method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:519
+
void setDirectAction(void(*func)(void))
Dummy method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:520
int16_t receiveDirect() override
Dummy direct mode reception method, to ensure PhysicalLayer compatibility.
Definition: nRF24.cpp:152
int16_t disablePipe(uint8_t pipeNum)
Disables specified receive pipe.
Definition: nRF24.cpp:406
nRF24(Module *mod)
Default constructor.
Definition: nRF24.cpp:4
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:100
+
int16_t receive(String &str, size_t len=0)
Arduino String receive method.
Definition: PhysicalLayer.cpp:102
int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are -18, -12, -6 or 0 dBm.
Definition: nRF24.cpp:279
int16_t getStatus(uint8_t mask=0xFF)
Gets nRF24 status register.
Definition: nRF24.cpp:437
int16_t sleep()
Sets the module to sleep mode.
Definition: nRF24.cpp:70
@@ -397,7 +400,7 @@ $(document).ready(function(){initNavTree('n_r_f24_8h_source.html',''); initResiz
int16_t setAutoAck(bool autoAckOn=true)
Enable or disable auto-acknowledge packets on all pipes.
Definition: nRF24.cpp:470
int16_t setAddressWidth(uint8_t addrWidth)
Sets address width of transmit and receive pipes in bytes. Allowed values are 3, 4 or 5 bytes.
Definition: nRF24.cpp:308
int16_t readData(uint8_t *data, size_t len) override
Reads data received after calling startReceive method.
Definition: nRF24.cpp:228
-
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:51
+
int16_t startTransmit(String &str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition: PhysicalLayer.cpp:53