Added basic firmware and client support for the zigduino/atmel128rfa1. It can now...
[goodfet] / firmware / include / atmel_radio.h
1 /*! \file atmel_radio.h
2   \author bx but forked from neighbor Travis Goodspeed
3   \brief Constants for ATMEL_RADIO Driver
4 */
5
6 #ifndef ATMEL_RADIO_H
7 #define ATMEL_RADIO_H
8
9 #include "app.h"
10
11 #define ATMEL_RADIO   0x53
12
13 //Nordic RF Commands
14
15 //Grab a packet, if one is available.
16 #define ATMEL_RADIO_RX 0x80
17 //Send a packet.
18 #define ATMEL_RADIO_TX 0x81
19 //Flush RX
20 #define ATMEL_RADIO_RX_FLUSH 0x82
21 //Flush TX
22 #define ATMEL_RADIO_TX_FLUSH 0x83
23
24
25 //Nordic RF SPI Instructions
26 #define ATMEL_RADIO_R_REGISTER   0x00
27 #define ATMEL_RADIO_W_REGISTER   0x20
28 #define ATMEL_RADIO_R_RX_PAYLOAD 0x61
29 #define ATMEL_RADIO_W_TX_PAYLOAD 0xA0
30 #define ATMEL_RADIO_FLUSH_TX     0xE1
31 #define ATMEL_RADIO_FLUSH_RX     0xE2
32 #define ATMEL_RADIO_REUSE_TX_PL  0xE3
33 #define ATMEL_RADIO_NOP          0xFF
34
35
36 //ATMEL_RADIO24L01+ Registers
37 //These aren't yet used, but are included for later
38 //translation to XML.
39 #define ATMEL_RADIO_CONFIG      0x00
40 #define ATMEL_RADIO_EN_AA       0x01
41 #define ATMEL_RADIO_EN_RXADDR   0x02
42 #define ATMEL_RADIO_SETUP_AW    0x03
43 #define ATMEL_RADIO_SETUP_RETR  0x04
44 #define ATMEL_RADIO_RF_CH       0x05
45 #define ATMEL_RADIO_RF_SETUP    0x06
46 #define ATMEL_RADIO_STATUS      0x07
47 #define ATMEL_RADIO_OBSERVE_TX  0x08
48 #define ATMEL_RADIO_RPD         0x09
49 #define ATMEL_RADIO_RX_ADDR_P0  0x0A
50 #define ATMEL_RADIO_RX_ADDR_P1  0x0B
51 #define ATMEL_RADIO_RX_ADDR_P2  0x0C
52 #define ATMEL_RADIO_RX_ADDR_P3  0x0D
53 #define ATMEL_RADIO_RX_ADDR_P4  0x0E
54 #define ATMEL_RADIO_RX_ADDR_P5  0x0F
55 #define ATMEL_RADIO_TX_ADDR     0x10
56 #define ATMEL_RADIO_RX_PW_P0    0x11
57 #define ATMEL_RADIO_RX_PW_P1    0x12
58 #define ATMEL_RADIO_RX_PW_P2    0x13
59 #define ATMEL_RADIO_RX_PW_P3    0x14
60 #define ATMEL_RADIO_RX_PW_P4    0x15
61 #define ATMEL_RADIO_RX_PW_P5    0x16
62 #define ATMEL_RADIO_FIFO_STATUS 0x17
63 #define ATMEL_RADIO_DYNPD       0x1C
64 //Also 32-byte buffers for ACK_PLD, TX_PLD, and RX_PLD.
65 //Separate SPI commands.
66
67 extern app_t const atmel_radio_app;
68
69 #endif // ATMEL_RADIO_H