7abdf368d7ecafd71c30d08cdff305e0913fe369
[goodfet] / firmware / include / nrf.h
1 /*! \file nrf.h
2   \author Travis Goodspeed
3   \brief Constants for NRF Driver
4 */
5
6 //Nording RF Commands
7
8 //Grab a packet, if one is available.
9 #define NRF_RX 0x80
10 //Send a packet.
11 #define NRF_TX 0x81
12 //Flsuh RX
13 #define NRF_RX_FLUSH 0x82
14
15 //Nordic RF SPI Instructions
16 #define NRF_R_REGISTER   0x00
17 #define NRF_W_REGISTER   0x20
18 #define NRF_R_RX_PAYLOAD 0x61
19 #define NRF_W_TX_PAYLOAD 0xA0
20 #define NRF_FLUSH_TX     0xE1
21 #define NRF_FLUSH_RX     0xE2
22 #define NRF_REUSE_TX_PL  0xE3
23 #define NRF_NOP          0xFF
24
25
26 //NRF24L01+ Registers
27 //These aren't yet used, but are included for later
28 //translation to XML.
29 #define NRF_CONFIG      0x00
30 #define NRF_EN_AA       0x01
31 #define NRF_EN_RXADDR   0x02
32 #define NRF_SETUP_AW    0x03
33 #define NRF_SETUP_RETR  0x04
34 #define NRF_RF_CH       0x05
35 #define NRF_RF_SETUP    0x06
36 #define NRF_STATUS      0x07
37 #define NRF_OBSERVE_TX  0x08
38 #define NRF_RPD         0x09
39 #define NRF_RX_ADDR_P0  0x0A
40 #define NRF_RX_ADDR_P1  0x0B
41 #define NRF_RX_ADDR_P2  0x0C
42 #define NRF_RX_ADDR_P3  0x0D
43 #define NRF_RX_ADDR_P4  0x0E
44 #define NRF_RX_ADDR_P5  0x0F
45 #define NRF_TX_ADDR     0x10
46 #define NRF_RX_PW_P0    0x11
47 #define NRF_RX_PW_P1    0x12
48 #define NRF_RX_PW_P2    0x13
49 #define NRF_RX_PW_P3    0x14
50 #define NRF_RX_PW_P4    0x15
51 #define NRF_RX_PW_P5    0x16
52 #define NRF_FIFO_STATUS 0x17
53 #define NRF_DYNPD       0x1C
54 //Also 32-byte buffers for ACK_PLD, TX_PLD, and RX_PLD.
55 //Separate SPI commands.
56
57
58
59