33 #ifndef CC2420_CONST_H
34 #define CC2420_CONST_H
45 enum cc2420_status_byte {
46 CC2420_XOSC16M_STABLE = 6,
47 CC2420_TX_UNDERFLOW = 5,
51 CC2420_RSSI_VALID = 1,
55 enum cc2420_memory_size {
56 CC2420_RAM_SIZE = 368,
57 CC2420_FIFO_SIZE = 128,
62 CC2420RAM_TXFIFO = 0x000,
63 CC2420RAM_RXFIFO = 0x080,
64 CC2420RAM_KEY0 = 0x100,
65 CC2420RAM_RXNONCE = 0x110,
66 CC2420RAM_SABUF = 0x120,
67 CC2420RAM_KEY1 = 0x130,
68 CC2420RAM_TXNONCE = 0x140,
69 CC2420RAM_CBCSTATE = 0x150,
70 CC2420RAM_IEEEADDR = 0x160,
71 CC2420RAM_PANID = 0x168,
72 CC2420RAM_SHORTADDR = 0x16A,
76 enum cc2420_register {
78 CC2420_SXOSCON = 0x01,
82 CC2420_STXONCCA = 0x05,
84 CC2420_SXOSCOFF = 0x07,
85 CC2420_SFLUSHRX = 0x08,
86 CC2420_SFLUSHTX = 0x09,
88 CC2420_SACKPEND = 0x0B,
94 CC2420_MDMCTRL0 = 0x11,
95 CC2420_MDMCTRL1 = 0x12,
97 CC2420_SYNCWORD = 0x14,
99 CC2420_RXCTRL0 = 0x16,
100 CC2420_RXCTRL1 = 0x17,
101 CC2420_FSCTRL = 0x18,
102 CC2420_SECCTRL0 = 0x19,
103 CC2420_SECCTRL1 = 0x1A,
104 CC2420_BATTMON = 0x1B,
105 CC2420_IOCFG0 = 0x1C,
106 CC2420_IOCFG1 = 0x1D,
107 CC2420_MANFIDL = 0x1E,
108 CC2420_MANFIDH = 0x1F,
110 CC2420_MANAND = 0x21,
112 CC2420_AGCCTRL = 0x23,
113 CC2420_AGCTST0 = 0x24,
114 CC2420_AGCTST1 = 0x25,
115 CC2420_AGCTST2 = 0x26,
116 CC2420_FSTST0 = 0x27,
117 CC2420_FSTST1 = 0x28,
118 CC2420_FSTST2 = 0x29,
119 CC2420_FSTST3 = 0x2A,
120 CC2420_RXBPFTST = 0x2B,
121 CC2420_FSMSTATE = 0x2C,
122 CC2420_ADCTST = 0x2D,
123 CC2420_DACTST = 0x2E,
124 CC2420_TOPTST = 0x2F,
125 CC2420_RESERVED = 0x30,
127 CC2420_TXFIFO = 0x3E,
128 CC2420_RXFIFO = 0x3F,
132 enum cc2420_secctrl0 {
133 CC2420_SECCTRL0_NO_SECURITY = 0x0000,
134 CC2420_SECCTRL0_CBC_MAC = 0x0001,
135 CC2420_SECCTRL0_CTR = 0x0002,
136 CC2420_SECCTRL0_CCM = 0x0003,
138 CC2420_SECCTRL0_SEC_M_IDX = 2,
140 CC2420_SECCTRL0_RXKEYSEL0 = 0x0000,
141 CC2420_SECCTRL0_RXKEYSEL1 = 0x0020,
143 CC2420_SECCTRL0_TXKEYSEL0 = 0x0000,
144 CC2420_SECCTRL0_TXKEYSEL1 = 0x0040,
146 CC2420_SECCTRL0_SAKEYSEL0 = 0x0000,
147 CC2420_SECCTRL0_SAKEYSEL1 = 0x0080,
149 CC2420_SECCTRL0_SEC_CBC_HEAD = 0x0100,
150 CC2420_SECCTRL0_RXFIFO_PROTECTION = 0x0200,