00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef CC2420_CONST_H
00034 #define CC2420_CONST_H
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 enum cc2420_status_byte {
00046 CC2420_XOSC16M_STABLE = 6,
00047 CC2420_TX_UNDERFLOW = 5,
00048 CC2420_ENC_BUSY = 4,
00049 CC2420_TX_ACTIVE = 3,
00050 CC2420_LOCK = 2,
00051 CC2420_RSSI_VALID = 1,
00052 };
00053
00054
00055 enum cc2420_memory_size {
00056 CC2420_RAM_SIZE = 368,
00057 CC2420_FIFO_SIZE = 128,
00058 };
00059
00060
00061 enum cc2420_address {
00062 CC2420RAM_TXFIFO = 0x000,
00063 CC2420RAM_RXFIFO = 0x080,
00064 CC2420RAM_KEY0 = 0x100,
00065 CC2420RAM_RXNONCE = 0x110,
00066 CC2420RAM_SABUF = 0x120,
00067 CC2420RAM_KEY1 = 0x130,
00068 CC2420RAM_TXNONCE = 0x140,
00069 CC2420RAM_CBCSTATE = 0x150,
00070 CC2420RAM_IEEEADDR = 0x160,
00071 CC2420RAM_PANID = 0x168,
00072 CC2420RAM_SHORTADDR = 0x16A,
00073 };
00074
00075
00076 enum cc2420_register {
00077 CC2420_SNOP = 0x00,
00078 CC2420_SXOSCON = 0x01,
00079 CC2420_STXCAL = 0x02,
00080 CC2420_SRXON = 0x03,
00081 CC2420_STXON = 0x04,
00082 CC2420_STXONCCA = 0x05,
00083 CC2420_SRFOFF = 0x06,
00084 CC2420_SXOSCOFF = 0x07,
00085 CC2420_SFLUSHRX = 0x08,
00086 CC2420_SFLUSHTX = 0x09,
00087 CC2420_SACK = 0x0A,
00088 CC2420_SACKPEND = 0x0B,
00089 CC2420_SRXDEC = 0x0C,
00090 CC2420_STXENC = 0x0D,
00091 CC2420_SAES = 0x0E,
00092 CC2420_foo = 0x0F,
00093 CC2420_MAIN = 0x10,
00094 CC2420_MDMCTRL0 = 0x11,
00095 CC2420_MDMCTRL1 = 0x12,
00096 CC2420_RSSI = 0x13,
00097 CC2420_SYNCWORD = 0x14,
00098 CC2420_TXCTRL = 0x15,
00099 CC2420_RXCTRL0 = 0x16,
00100 CC2420_RXCTRL1 = 0x17,
00101 CC2420_FSCTRL = 0x18,
00102 CC2420_SECCTRL0 = 0x19,
00103 CC2420_SECCTRL1 = 0x1A,
00104 CC2420_BATTMON = 0x1B,
00105 CC2420_IOCFG0 = 0x1C,
00106 CC2420_IOCFG1 = 0x1D,
00107 CC2420_MANFIDL = 0x1E,
00108 CC2420_MANFIDH = 0x1F,
00109 CC2420_FSMTC = 0x20,
00110 CC2420_MANAND = 0x21,
00111 CC2420_MANOR = 0x22,
00112 CC2420_AGCCTRL = 0x23,
00113 CC2420_AGCTST0 = 0x24,
00114 CC2420_AGCTST1 = 0x25,
00115 CC2420_AGCTST2 = 0x26,
00116 CC2420_FSTST0 = 0x27,
00117 CC2420_FSTST1 = 0x28,
00118 CC2420_FSTST2 = 0x29,
00119 CC2420_FSTST3 = 0x2A,
00120 CC2420_RXBPFTST = 0x2B,
00121 CC2420_FSMSTATE = 0x2C,
00122 CC2420_ADCTST = 0x2D,
00123 CC2420_DACTST = 0x2E,
00124 CC2420_TOPTST = 0x2F,
00125 CC2420_RESERVED = 0x30,
00126
00127 CC2420_TXFIFO = 0x3E,
00128 CC2420_RXFIFO = 0x3F,
00129 };
00130
00131
00132 enum cc2420_secctrl0 {
00133 CC2420_SECCTRL0_NO_SECURITY = 0x0000,
00134 CC2420_SECCTRL0_CBC_MAC = 0x0001,
00135 CC2420_SECCTRL0_CTR = 0x0002,
00136 CC2420_SECCTRL0_CCM = 0x0003,
00137
00138 CC2420_SECCTRL0_SEC_M_IDX = 2,
00139
00140 CC2420_SECCTRL0_RXKEYSEL0 = 0x0000,
00141 CC2420_SECCTRL0_RXKEYSEL1 = 0x0020,
00142
00143 CC2420_SECCTRL0_TXKEYSEL0 = 0x0000,
00144 CC2420_SECCTRL0_TXKEYSEL1 = 0x0040,
00145
00146 CC2420_SECCTRL0_SAKEYSEL0 = 0x0000,
00147 CC2420_SECCTRL0_SAKEYSEL1 = 0x0080,
00148
00149 CC2420_SECCTRL0_SEC_CBC_HEAD = 0x0100,
00150 CC2420_SECCTRL0_RXFIFO_PROTECTION = 0x0200,
00151 };
00152
00153 #endif