diff --git a/RF24_config.h b/RF24_config.h index e249de9fd..f3b88e260 100644 --- a/RF24_config.h +++ b/RF24_config.h @@ -123,7 +123,7 @@ #endif // !defined(__arm__) && !defined (__ARDUINO_X86__) #ifndef _BV - #define _BV(x) (1<<(x)) + #define _BV(x) (1<<(x)) #endif #endif // defined (ARDUINO) && !defined (__arm__) && !defined (__ARDUINO_X86__) @@ -159,38 +159,41 @@ #if !defined (ARDUINO) // This doesn't work on Arduino DUE typedef char const char; + #elif defined (ARDUINO_ARCH_SAMD) + #define printf Serial.printf + #else // Fill in pgm_read_byte that is used, but missing from DUE - #ifdef ARDUINO_ARCH_AVR - #include - #endif - #ifndef pgm_read_byte - #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) - #endif + #if defined (ARDUINO_ARCH_AVR) || defined (ARDUINO_ARCH_SAMD) + #include + #endif + #ifndef pgm_read_byte + #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) + #endif #endif // !defined (ARDUINO) #ifndef prog_uint16_t - typedef uint16_t prog_uint16_t; + typedef uint16_t prog_uint16_t; #endif #ifndef PSTR - #define PSTR(x) (x) + #define PSTR(x) (x) #endif #ifndef printf_P - #define printf_P printf + #define printf_P printf #endif #ifndef strlen_P - #define strlen_P strlen + #define strlen_P strlen #endif #ifndef PROGMEM - #define PROGMEM + #define PROGMEM #endif #ifndef pgm_read_word - #define pgm_read_word(p) (*(p)) + #define pgm_read_word(p) (*(p)) #endif #if !defined pgm_read_ptr || defined ARDUINO_ARCH_MBED - #define pgm_read_ptr(p) (*(p)) + #define pgm_read_ptr(p) (*(p)) #endif #ifndef PRIPSTR - #define PRIPSTR "%s" + #define PRIPSTR "%s" #endif #endif // !defined (ARDUINO) || defined (ESP_PLATFORM) || defined (__arm__) || defined (__ARDUINO_X86__) && !defined (XMEGA) diff --git a/docs/arduino.md b/docs/arduino.md index aeb06d57a..a24df378e 100644 --- a/docs/arduino.md +++ b/docs/arduino.md @@ -248,3 +248,6 @@ void setup() { // ... continue with program as normal (see library examples/ folder) } ``` + +#### Other platforms that support multiple SPI bus objects +- need example for [ArduinoCore-mbed SPI library](https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/SPI) (applies to Arduino Nano 33 BLE boards)