Optimized high speed nRF24L01+ driver class documentation
v1.4.8
TMRh20 2020 - Optimized fork of the nRF24L01+ driver
Main Page
Related Pages
Modules
Classes
Files
Examples
File List
File Members
Loading...
Searching...
No Matches
utility
Template
RF24_arch_config.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
3
*
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* version 2 as published by the Free Software Foundation.
7
*/
8
21
#ifndef RF24_UTILITY_TEMPLATE_RF24_ARCH_CONFIG_H_
22
#define RF24_UTILITY_TEMPLATE_RF24_ARCH_CONFIG_H_
23
24
#define RF24_LINUX
25
26
#include <stddef.h>
27
#include "
spi.h
"
28
#include "
gpio.h
"
29
#include "
compatibility.h
"
30
#include <stdint.h>
31
#include <stdio.h>
32
#include <time.h>
33
#include <string.h>
34
#include <sys/time.h>
35
36
#define _BV(x) (1 << (x))
37
#define _SPI spi
38
39
#undef SERIAL_DEBUG
40
#ifdef SERIAL_DEBUG
41
#define IF_SERIAL_DEBUG(x) ({ x; })
42
#else
43
#define IF_SERIAL_DEBUG(x)
44
#endif
45
46
// Avoid spurious warnings
47
#if !defined(NATIVE) && defined(ARDUINO)
48
#undef PROGMEM
49
#define PROGMEM __attribute__((section(".progmem.data"
)))
50
#undef PSTR
51
#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0]; }))
52
#endif
53
54
typedef
uint16_t
prog_uint16_t
;
55
typedef
uint16_t
rf24_gpio_pin_t
;
56
#define PSTR(x) (x)
57
#define printf_P printf
58
#define strlen_P strlen
59
#define PROGMEM
60
#define pgm_read_word(p) (*(const unsigned short*)(p))
61
#define PRIPSTR "%s"
62
#define pgm_read_byte(p) (*(const unsigned char*)(p))
63
64
// Function, constant map as a result of migrating from Arduino
65
#define LOW GPIO::OUTPUT_LOW
66
#define HIGH GPIO::OUTPUT_HIGH
67
#define INPUT GPIO::DIRECTION_IN
68
#define OUTPUT GPIO::DIRECTION_OUT
69
#define digitalWrite(pin, value) GPIO::write(pin, value)
70
#define pinMode(pin, direction) GPIO::open(pin, direction)
71
#define delay(milisec) __msleep(milisec)
72
#define delayMicroseconds(usec) __usleep(usec)
73
#define millis() __millis()
74
77
#endif
// RF24_UTILITY_TEMPLATE_RF24_ARCH_CONFIG_H_
compatibility.h
gpio.h
prog_uint16_t
uint16_t prog_uint16_t
Definition:
RF24_arch_config.h:54
rf24_gpio_pin_t
uint16_t rf24_gpio_pin_t
Definition:
RF24_arch_config.h:55
spi.h
Generated on Wed Sep 27 2023 06:03:10 for Optimized high speed nRF24L01+ driver class documentation by
1.9.6