Skip to content

Commit

Permalink
Merge pull request #38 from spaniakos/master
Browse files Browse the repository at this point in the history
Merge Intel Galileo Support for Development Library #38 from @spaniakos
  • Loading branch information
TMRh20 committed Jan 14, 2015
2 parents dd7d04b + ac63091 commit c8a3e85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions RF24Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "RF24.h"
#include "RF24Network.h"

#if defined (ENABLE_SLEEP_MODE)
#if defined (ENABLE_SLEEP_MODE) && !defined (__ARDUINO_X86__)
#include <avr/sleep.h>
#include <avr/power.h>
volatile byte sleep_cycles_remaining;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -530,4 +530,4 @@ void RF24Network::setup_watchdog(uint8_t prescalar){


#endif // not ATTiny
#endif // Enable sleep mode
#endif // Enable sleep mode
14 changes: 10 additions & 4 deletions RF24Network_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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 <SPI.h>
#endif
Expand All @@ -40,13 +40,13 @@
#include <string.h>


#if defined(__arm__) || defined (CORE_TEENSY)
#if defined(__arm__) || defined (CORE_TEENSY) || defined (__ARDUINO_X86__)
#include <SPI.h>
#endif

#if !defined(CORE_TEENSY)
#define _BV(x) (1<<(x))
#if !defined(__arm__)
#if !defined(__arm__) && !defined (__ARDUINO_X86__)
extern HardwareSPI SPI;
#endif
#endif
Expand All @@ -64,6 +64,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
Expand All @@ -78,7 +84,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 <avr/pgmspace.h>
#define PRIPSTR "%S"
#else
Expand Down

0 comments on commit c8a3e85

Please sign in to comment.