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
RF24_config.h
00001 00002 /* 00003 Copyright (C) 2011 J. Coliz <maniacbug@ymail.com> 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License 00006 version 2 as published by the Free Software Foundation. 00007 */ 00008 00009 /* 00010 * Mbed support added by Akash Vibhute <akash.roboticist@gmail.com> 00011 * Porting completed on Nov/05/2015 00012 * 00013 * Updated 1: Synced with TMRh20's RF24 library on Nov/04/2015 from https://github.com/TMRh20 00014 * Updated 2: Synced with TMRh20's RF24 library on Apr/18/2015 from https://github.com/TMRh20 00015 * 00016 */ 00017 00018 00019 #ifndef __RF24_CONFIG_H__ 00020 #define __RF24_CONFIG_H__ 00021 00022 /*** USER DEFINES: ***/ 00023 //#define FAILURE_HANDLING 00024 //#define SERIAL_DEBUG 00025 //#define MINIMAL 00026 /**********************/ 00027 #define rf24_max(a,b) (a>b?a:b) 00028 #define rf24_min(a,b) (a<b?a:b) 00029 00030 00031 #include <mbed.h> 00032 00033 // RF modules support 10 Mhz SPI bus speed 00034 const uint32_t RF_SPI_SPEED = 10000000; 00035 00036 #define HIGH 1 00037 #define LOW 0 00038 00039 //#include <stdint.h> 00040 //#include <stdio.h> 00041 //#include <string.h> 00042 00043 #define _BV(x) (1<<(x)) 00044 #define _SPI SPI 00045 00046 #ifdef SERIAL_DEBUG 00047 #define IF_SERIAL_DEBUG(x) ({x;}) 00048 #else 00049 #define IF_SERIAL_DEBUG(x) 00050 #endif 00051 00052 //#define printf_P printf 00053 #define printf_P 00054 //#define _BV(bit) (1<<(bit)) 00055 #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 00056 00057 typedef uint16_t prog_uint16_t; 00058 #define PSTR(x) (x) 00059 #define sprintf(...) os_sprintf( __VA_ARGS__ ) 00060 //#define printf_P printf 00061 #define printf_P 00062 #define strlen_P strlen 00063 #define PROGMEM 00064 #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 00065 #define pgm_read_word(p) (*(p)) 00066 #define PRIPSTR "%s" 00067 00068 #endif // __RF24_CONFIG_H__ 00069
Generated on Wed Jul 13 2022 11:49:09 by
1.7.2

