typedef uint8_t cc2420_status_t;
+#ifndef TFRAMES_ENABLED
+#define CC2420_IFRAME_TYPE
+#endif
+
/**
* CC2420 header. An I-frame (interoperability frame) header has an
* extra network byte specified by 6LowPAN
nxle_uint8_t network;
#endif
+#ifndef TINYOS_IP
nxle_uint8_t type;
+#endif
+
} cc2420_header_t;
/**
/**
* CC2420 Packet metadata. Contains extra information about the message
- * that will not be transmitted
+ * that will not be transmitted.
+ *
+ * Note that the first two bytes automatically take in the values of the
+ * FCS when the payload is full. Do not modify the first two bytes of metadata.
*/
typedef nx_struct cc2420_metadata_t {
- nx_uint8_t tx_power;
nx_uint8_t rssi;
nx_uint8_t lqi;
+ nx_uint8_t tx_power;
nx_bool crc;
nx_bool ack;
nx_uint16_t time;
#endif
/**
- * The 6LowPAN ID has yet to be defined for a TinyOS network.
+ * The 6LowPAN NALP ID for a TinyOS network is 63 (TEP 125).
*/
#ifndef TINYOS_6LOWPAN_NETWORK_ID
-#define TINYOS_6LOWPAN_NETWORK_ID 0x0
+#define TINYOS_6LOWPAN_NETWORK_ID 0x3f
#endif
CC2420_TIME_SYMBOL = 2, // 2 symbols / jiffy
CC2420_BACKOFF_PERIOD = ( 20 / CC2420_TIME_SYMBOL ), // symbols
CC2420_MIN_BACKOFF = ( 20 / CC2420_TIME_SYMBOL ), // platform specific?
- CC2420_ACK_WAIT_DELAY = 128, // jiffies
+ CC2420_ACK_WAIT_DELAY = 256, // jiffies
};
enum cc2420_status_enums {
CC2420_SACK = 0x0a,
CC2420_SACKPEND = 0x0b,
CC2420_SRXDEC = 0x0c,
- CC2420_SRXENC = 0x0d,
+ CC2420_STXENC = 0x0d,
CC2420_SAES = 0x0e,
CC2420_MAIN = 0x10,
CC2420_MDMCTRL0 = 0x11,