Fix possible issues in CubeCell 1.3.0 (#397)

pull/401/head
jgromes 2021-10-30 21:22:36 +02:00
rodzic 3a8360c361
commit e3ff5affc6
2 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -364,7 +364,7 @@
#define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
#define RADIOLIB_EXCLUDE_ESP8266
#elif defined(__ASR6501__)
#elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
// CubeCell
#define RADIOLIB_PLATFORM "CubeCell"
#define RADIOLIB_PIN_TYPE uint8_t
@ -376,6 +376,8 @@
#define RADIOLIB_DEFAULT_SPI SPI
#define RADIOLIB_PROGMEM PROGMEM
#define RADIOLIB_PROGMEM_READ_BYTE(addr) pgm_read_byte(addr)
#define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
#define RADIOLIB_HARDWARE_SERIAL_PORT Serial1
// CubeCell doesn't seem to define nullptr, let's do something like that now
#define nullptr NULL
@ -389,6 +391,12 @@
// ... and it also has no tone(). This platform was designed by an idiot.
#define RADIOLIB_TONE_UNSUPPORTED
// ... AND as the (hopefully) final nail in the coffin, IT F*CKING DEFINES YIELD() AS A MACRO THAT DOES NOTHING!!!
#define RADIOLIB_YIELD_UNSUPPORTED
#if defined(yield)
#undef yield
#endif
#else
// other platforms not covered by the above list - this may or may not work
#define RADIOLIB_PLATFORM "Unknown"
@ -415,7 +423,7 @@
* verbose - full transcript of all SPI/UART communication
*/
//#define RADIOLIB_DEBUG
#define RADIOLIB_DEBUG
//#define RADIOLIB_VERBOSE
// set which Serial port should be used for debug output

Wyświetl plik

@ -374,7 +374,7 @@ void Module::detachInterrupt(RADIOLIB_PIN_TYPE interruptNum) {
}
void Module::yield() {
#if !defined(__ASR6501__)
#if !defined(RADIOLIB_YIELD_UNSUPPORTED)
::yield();
#endif
}