TMRh20 ported to MBED
Fork of TMRh20 by
RF24_config.h@0:163155b607df, 2016-03-10 (annotated)
- Committer:
- gume
- Date:
- Thu Mar 10 14:40:30 2016 +0000
- Revision:
- 0:163155b607df
- Child:
- 1:8f889354678f
Initial commit. Imported from the Arduino project
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gume | 0:163155b607df | 1 | |
gume | 0:163155b607df | 2 | /* |
gume | 0:163155b607df | 3 | Copyright (C) 2011 J. Coliz <maniacbug@ymail.com> |
gume | 0:163155b607df | 4 | |
gume | 0:163155b607df | 5 | This program is free software; you can redistribute it and/or |
gume | 0:163155b607df | 6 | modify it under the terms of the GNU General Public License |
gume | 0:163155b607df | 7 | version 2 as published by the Free Software Foundation. |
gume | 0:163155b607df | 8 | */ |
gume | 0:163155b607df | 9 | |
gume | 0:163155b607df | 10 | /* spaniakos <spaniakos@gmail.com> |
gume | 0:163155b607df | 11 | Added __ARDUINO_X86__ support |
gume | 0:163155b607df | 12 | */ |
gume | 0:163155b607df | 13 | |
gume | 0:163155b607df | 14 | #ifndef __RF24_CONFIG_H__ |
gume | 0:163155b607df | 15 | #define __RF24_CONFIG_H__ |
gume | 0:163155b607df | 16 | |
gume | 0:163155b607df | 17 | #include <stdint.h> |
gume | 0:163155b607df | 18 | |
gume | 0:163155b607df | 19 | #define rf24_max(a,b) (a>b?a:b) |
gume | 0:163155b607df | 20 | #define rf24_min(a,b) (a<b?a:b) |
gume | 0:163155b607df | 21 | |
gume | 0:163155b607df | 22 | #define RF24_SPI_TRANSACTIONS |
gume | 0:163155b607df | 23 | |
gume | 0:163155b607df | 24 | // RF modules support 10 Mhz SPI bus speed |
gume | 0:163155b607df | 25 | const uint32_t RF24_SPI_SPEED = 10000000; |
gume | 0:163155b607df | 26 | |
gume | 0:163155b607df | 27 | //typedef char const char; |
gume | 0:163155b607df | 28 | |
gume | 0:163155b607df | 29 | typedef uint16_t prog_uint16_t; |
gume | 0:163155b607df | 30 | #define PSTR(x) (x) |
gume | 0:163155b607df | 31 | #define printf_P printf |
gume | 0:163155b607df | 32 | #define strlen_P strlen |
gume | 0:163155b607df | 33 | #define PROGMEM |
gume | 0:163155b607df | 34 | #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) |
gume | 0:163155b607df | 35 | #define pgm_read_word(p) (*(p)) |
gume | 0:163155b607df | 36 | |
gume | 0:163155b607df | 37 | #define PRIPSTR "%s" |
gume | 0:163155b607df | 38 | |
gume | 0:163155b607df | 39 | #define HIGH 1 |
gume | 0:163155b607df | 40 | #define LOW 0 |
gume | 0:163155b607df | 41 | #define _BV(n) (1 << n) |
gume | 0:163155b607df | 42 | |
gume | 0:163155b607df | 43 | #endif // __RF24_CONFIG_H__ |
gume | 0:163155b607df | 44 |