Moved environment-specific checking out to RF24_config.h

This commit is contained in:
maniacbug
2011-12-10 15:52:33 -08:00
parent f3934084a1
commit 53cb579400
3 changed files with 63 additions and 29 deletions

View File

@@ -6,37 +6,11 @@
version 2 as published by the Free Software Foundation.
*/
#if ARDUINO < 100
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24_config.h"
#include "RF24.h"
#undef SERIAL_DEBUG
#ifdef SERIAL_DEBUG
#define IF_SERIAL_DEBUG(x) ({x;})
#else
#define IF_SERIAL_DEBUG(x)
#endif
// Avoid spurious warnings
#if ! defined( NATIVE ) && defined( ARDUINO )
#undef PROGMEM
#define PROGMEM __attribute__(( section(".progmem.data") ))
#undef PSTR
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
#endif
#ifdef ARDUINO
#define PRIPSTR "%S"
#else
#define PRIPSTR "%s"
#endif
/****************************************************************************/
void RF24::csn(int mode)