forked from mysensors/Raspberry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RF24_config.h
88 lines (70 loc) · 2.02 KB
/
RF24_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
Copyright (C) 2011 J. Coliz <[email protected]>
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.
Added Arduino Due support from https://github.com/mcrosson/
*/
/* spaniakos <[email protected]>
Added __ARDUINO_X86__ support
*/
#ifndef __RF24_CONFIG_H__
#define __RF24_CONFIG_H__
/*** USER DEFINES: ***/
#define FAILURE_HANDLING
//#define SERIAL_DEBUG
//#define MINIMAL
//#define SPI_UART // Requires library from https://github.com/TMRh20/Sketches/tree/master/SPI_UART
//#define SOFTSPI // Requires library from https://github.com/greiman/DigitalIO
/**********************/
#define RF24_REMOTE
#define rf24_max(a,b) (a>b?a:b)
#define rf24_min(a,b) (a<b?a:b)
#define VIRTUAL virtual
#define byte uint8_t
#undef __arm__
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <sys/time.h>
#include <stddef.h>
// GCC a Arduino Missing
#define _BV(x) (1<<(x))
#define pgm_read_word(p) (*(p))
#define pgm_read_byte(p) (*(p))
//typedef uint16_t prog_uint16_t;
#define PSTR(x) (x)
#define printf_P printf
#define strlen_P strlen
#define PROGMEM
#define PRIPSTR "%s"
#ifdef SERIAL_DEBUG
#define IF_SERIAL_DEBUG(x) ({x;})
#else
#define IF_SERIAL_DEBUG(x)
#endif
#define LOW 0
#define HIGH 1
#define INPUT 0
#define OUTPUT 1
#define pinMode(pin, mode)
#define digitalWrite(pin, value)
#define delayMicroseconds(us)
#define delay(ms)
//#define millis() 0
class SPIClass {
public:
static byte transfer(byte _data) { return 0; };
// SPI Configuration methods
inline static void attachInterrupt() {};
inline static void detachInterrupt() {}; // Default
static void begin() {}; // Default
static void end() {};
static void setBitOrder(uint8_t) {};
static void setDataMode(uint8_t) {};
static void setClockDivider(uint8_t) {};
};
extern SPIClass SPI;
#define _SPI SPI
#endif // __RF24_CONFIG_H__