forked from maniacbug/RF24
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:maniacbug/RF24
- Loading branch information
Showing
25 changed files
with
1,089 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
/* | ||
Copyright (C) 2011 James Coliz, Jr. <maniacbug@ymail.com> | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public License | ||
version 2 as published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __RF24_CONFIG_H__ | ||
#define __RF24_CONFIG_H__ | ||
|
||
#if ARDUINO < 100 | ||
#include <WProgram.h> | ||
#else | ||
#include <Arduino.h> | ||
#endif | ||
|
||
#include <stddef.h> | ||
|
||
// Stuff that is normally provided by Arduino | ||
#ifndef ARDUINO | ||
#include <stdint.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
extern HardwareSPI SPI; | ||
#define _BV(x) (1<<(x)) | ||
#endif | ||
|
||
#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 | ||
|
||
// Progmem is Arduino-specific | ||
#ifdef ARDUINO | ||
#include <avr/pgmspace.h> | ||
#define PRIPSTR "%S" | ||
#else | ||
typedef char const prog_char; | ||
typedef uint16_t prog_uint16_t; | ||
#define PSTR(x) (x) | ||
#define printf_P printf | ||
#define strlen_P strlen | ||
#define PROGMEM | ||
#define pgm_read_word(p) (*(p)) | ||
#define PRIPSTR "%s" | ||
#endif | ||
|
||
#endif // __RF24_CONFIG_H__ | ||
// vim:ai:cin:sts=2 sw=2 ft=cpp |
Oops, something went wrong.