Skip to content

Commit ed252c4

Browse files
committed
fix: fix xiao compilation error
1 parent 86186cc commit ed252c4

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

RHUartDriver.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
THE SOFTWARE.
2929
*/
3030

31-
#include <RHUartDriver.h>
31+
#include "RHUartDriver.h"
3232

3333
template <typename T>
3434
RHUartDriver<T>::RHUartDriver(T& ss)
@@ -112,12 +112,17 @@ void RHUartDriver<T>::burstWrite(uint8_t reg, uint8_t* src, uint8_t len) {
112112
}
113113

114114

115-
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
115+
#if defined(ARDUINO_SAMD_VARIANT_COMPLIANCE) || defined(NRF52840_XXAA)
116116
template class RHUartDriver<Uart>;
117117
#endif
118118
template class RHUartDriver<HardwareSerial>;
119119

120120
#ifdef __AVR__
121121
#include <SoftwareSerial.h>
122122
template class RHUartDriver<SoftwareSerial>;
123+
#endif
124+
125+
#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350) || defined(ARDUINO_XIAO_RA4M1)
126+
#include <SoftwareSerial.h>
127+
template class RHUartDriver<SoftwareSerial>;
123128
#endif

RH_RF95.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#include <RH_RF95.h>
2+
#include "RH_RF95.h"
33

44

55
// These are indexed by the values of ModemConfigChoice
@@ -335,12 +335,19 @@ void RH_RF95<T>::setPreambleLength(uint16_t bytes) {
335335
this->write(RH_RF95_REG_21_PREAMBLE_LSB, bytes & 0xff);
336336
}
337337

338-
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
338+
#if defined(ARDUINO_SAMD_VARIANT_COMPLIANCE) || defined(NRF52840_XXAA)
339339
template class RH_RF95<Uart>;
340340
#endif
341+
342+
341343
template class RH_RF95<HardwareSerial>;
342344

343345
#ifdef __AVR__
344346
#include <SoftwareSerial.h>
345347
template class RH_RF95<SoftwareSerial>;
348+
#endif
349+
350+
#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350) || defined(ARDUINO_XIAO_RA4M1)
351+
#include <SoftwareSerial.h>
352+
template class RH_RF95<SoftwareSerial>;
346353
#endif

0 commit comments

Comments
 (0)