kopia lustrzana https://github.com/jgromes/RadioLib
Added software serial platform macro
rodzic
c093d34c91
commit
11b501cbc9
|
@ -7,8 +7,8 @@ Module::Module(int rx, int tx, HardwareSerial* useSer) {
|
|||
_int0 = -1;
|
||||
_int1 = -1;
|
||||
|
||||
#if defined(ESP32) || defined(SAMD_SERIES) || defined (ARDUINO_ARCH_STM32)
|
||||
ModuleSerial = useSer;
|
||||
#if SOFTWARE_SERIAL_UNSUPPORTED
|
||||
ModuleSerial = useSer;
|
||||
#else
|
||||
ModuleSerial = new SoftwareSerial(_rx, _tx);
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@ Module::Module(int cs, int int0, int int1, int rx, int tx, SPIClass& spi, SPISet
|
|||
_spi = &spi;
|
||||
_spiSettings = spiSettings;
|
||||
|
||||
#if defined(ESP32) || defined(SAMD_SERIES) || defined (ARDUINO_ARCH_STM32)
|
||||
#if SOFTWARE_SERIAL_UNSUPPORTED
|
||||
ModuleSerial = useSer;
|
||||
#else
|
||||
ModuleSerial = new SoftwareSerial(_rx, _tx);
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
#error "Unsupported Arduino version (< 1.0.0)"
|
||||
#endif
|
||||
|
||||
// the following platforms do not support SoftwareSerial library
|
||||
#define SOFTWARE_SERIAL_UNSUPPORTED (defined(ESP32) || defined(SAMD_SERIES) || defined (ARDUINO_ARCH_STM32))
|
||||
|
||||
#define RADIOLIB_DEBUG_PORT Serial
|
||||
|
||||
//#define RADIOLIB_DEBUG
|
||||
|
|
Ładowanie…
Reference in New Issue