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_fork 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 MINIMAL // Strange package loss in this case 00028 00029 #define rf24_max(a,b) (a>b?a:b) 00030 #define rf24_min(a,b) (a<b?a:b) 00031 00032 00033 #include <mbed.h> 00034 00035 // RF modules support 10 Mhz SPI bus speed 00036 const uint32_t RF_SPI_SPEED = 10000000; 00037 00038 #define HIGH 1 00039 #define LOW 0 00040 00041 //#include <stdint.h> 00042 //#include <stdio.h> 00043 //#include <string.h> 00044 00045 #define _BV(x) (1<<(x)) 00046 #define _SPI SPI 00047 00048 #ifdef SERIAL_DEBUG 00049 #define IF_SERIAL_DEBUG(x) ({x;}) 00050 #else 00051 #define IF_SERIAL_DEBUG(x) 00052 #endif 00053 00054 //#define printf_P printf 00055 #define printf_P 00056 //#define _BV(bit) (1<<(bit)) 00057 #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 00058 00059 typedef uint16_t prog_uint16_t; 00060 #define PSTR(x) (x) 00061 #define sprintf(...) os_sprintf( __VA_ARGS__ ) 00062 //#define printf_P printf 00063 #define printf_P 00064 #define strlen_P strlen 00065 #define PROGMEM 00066 #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 00067 #define pgm_read_word(p) (*(p)) 00068 #define PRIPSTR "%s" 00069 00070 #endif // __RF24_CONFIG_H__ 00071
Generated on Fri Jul 15 2022 00:04:30 by
1.7.2
