Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RF24 by
Diff: RF24_config.h
- Revision:
- 6:5cc7136648d1
- Parent:
- 3:e94be00fd19e
- Child:
- 7:32d6957f37ae
--- a/RF24_config.h Tue Feb 23 00:40:33 2016 +0000 +++ b/RF24_config.h Thu Apr 21 04:10:58 2016 +0000 @@ -5,15 +5,16 @@ modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ - + /* * Mbed support added by Akash Vibhute <akash.roboticist@gmail.com> * Porting completed on Nov/05/2015 * - * Updated with TMRh20's RF24 library on Nov/04/2015 from https://github.com/TMRh20 + * Updated 1: Synced with TMRh20's RF24 library on Nov/04/2015 from https://github.com/TMRh20 + * Updated 2: Synced with TMRh20's RF24 library on Apr/18/2015 from https://github.com/TMRh20 * */ - + #ifndef __RF24_CONFIG_H__ #define __RF24_CONFIG_H__ @@ -26,18 +27,18 @@ #define rf24_max(a,b) (a>b?a:b) #define rf24_min(a,b) (a<b?a:b) -#if defined SPI_HAS_TRANSACTION && !defined SPI_UART && !defined SOFTSPI -#define RF24_SPI_TRANSACTIONS -#endif #include <mbed.h> // RF modules support 10 Mhz SPI bus speed const uint32_t RF_SPI_SPEED = 10000000; -#include <stdint.h> -#include <stdio.h> -#include <string.h> +#define HIGH 1 +#define LOW 0 + +//#include <stdint.h> +//#include <stdio.h> +//#include <string.h> #define _BV(x) (1<<(x)) #define _SPI SPI @@ -49,15 +50,18 @@ #endif #define printf_P printf -#define _BV(bit) (1<<(bit)) +//#define _BV(bit) (1<<(bit)) #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 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" + #define sprintf(...) os_sprintf( __VA_ARGS__ ) + #define printf_P printf + #define strlen_P strlen + #define PROGMEM + #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) + #define pgm_read_word(p) (*(p)) + #define PRIPSTR "%s" #endif // __RF24_CONFIG_H__ +
