From 3e46b9a395d62ff2c32ca383ddb597973f657f5b Mon Sep 17 00:00:00 2001 From: darky Date: Wed, 10 Dec 2014 14:27:15 +0100 Subject: [PATCH] Intel gallileo support --- RF24Network.cpp | 6 +++--- RF24Network_config.h | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index 40cff54c..9e8ababe 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -10,7 +10,7 @@ #include "RF24.h" #include "RF24Network.h" -#if defined (ENABLE_SLEEP_MODE) +#if defined (ENABLE_SLEEP_MODE) && !defined (__ARDUINO_X86__) #include #include volatile byte sleep_cycles_remaining; @@ -475,7 +475,7 @@ uint64_t pipe_address( uint16_t node, uint8_t pipe ) #if defined ENABLE_SLEEP_MODE -#if !defined(__arm__) +#if !defined(__arm__) && !defined (__ARDUINO_X86__) void wakeUp(){ sleep_disable(); @@ -530,4 +530,4 @@ void RF24Network::setup_watchdog(uint8_t prescalar){ #endif // not ATTiny -#endif // Enable sleep mode \ No newline at end of file +#endif // Enable sleep mode diff --git a/RF24Network_config.h b/RF24Network_config.h index 451e4055..4bf20580 100644 --- a/RF24Network_config.h +++ b/RF24Network_config.h @@ -27,7 +27,7 @@ // Define _BV for non-Arduino platforms and for Arduino DUE -#if defined (ARDUINO) && !defined (__arm__) +#if defined (ARDUINO) && !defined (__arm__) && !defined (__ARDUINO_X86__) #if !defined(__AVR_ATtiny25__) && !defined(__AVR_ATtiny45__) && !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny24__) && !defined(__AVR_ATtiny44__) && !defined(__AVR_ATtiny84__) #include #endif @@ -38,13 +38,13 @@ #include - #if defined(__arm__) || defined (CORE_TEENSY) + #if defined(__arm__) || defined (CORE_TEENSY) || defined (__ARDUINO_X86__) #include #endif #if !defined(CORE_TEENSY) #define _BV(x) (1<<(x)) - #if !defined(__arm__) + #if !defined(__arm__) && !defined (__ARDUINO_X86__) extern HardwareSPI SPI; #endif #endif @@ -62,6 +62,12 @@ #define printf_P(...) #endif #endif + +#if defined (__ARDUINO_X86__) + #define printf_P printf + #define sprintf_P sprintf + #define _BV(bit) (1<<(bit)) +#endif // Avoid spurious warnings // Arduino DUE is arm and uses traditional PROGMEM constructs @@ -76,7 +82,7 @@ // Progmem is Arduino-specific // Arduino DUE is arm and does not include avr/pgmspace -#if defined(ARDUINO) && ! defined(__arm__) +#if defined(ARDUINO) && ! defined(__arm__) && !defined (__ARDUINO_X86__) #include #define PRIPSTR "%S" #else