TMRh20 ported to MBED

Fork of TMRh20 by BME SmartLab

RF24_config.h

Committer:
gume
Date:
2016-03-16
Revision:
1:8f889354678f
Parent:
0:163155b607df
Child:
2:3332510eebba

File content as of revision 1:8f889354678f:


/*
 Copyright (C) 2011 J. Coliz <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.
 */

/* spaniakos <spaniakos@gmail.com>
 Added __ARDUINO_X86__ support
*/

#ifndef __RF24_CONFIG_H__
#define __RF24_CONFIG_H__

#include <stdint.h>

#define rf24_max(a,b) (a>b?a:b)
#define rf24_min(a,b) (a<b?a:b)

#define RF24_SPI_TRANSACTIONS

// RF modules support 10 Mhz SPI bus speed
const uint32_t RF24_SPI_SPEED = 10000000/5;

//typedef char const char;

typedef uint16_t prog_uint16_t;
#define PSTR(x) (x)
#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"

#define HIGH        1
#define LOW         0
#define _BV(n) (1 << n)

#endif // __RF24_CONFIG_H__