]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/CC2420.h
Support for I-frames is on by default.
[tinyos-2.x.git] / tos / chips / cc2420 / CC2420.h
index 46afe342f304b3722a8a857d3d2591f8e3936477..a3413ec2d061721657aa2ac0ee963e2ab0e734a3 100644 (file)
 
 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
@@ -55,7 +59,10 @@ typedef nx_struct cc2420_header_t {
   nxle_uint8_t network;
 #endif
 
+#ifndef TINYOS_IP
   nxle_uint8_t type;
+#endif
+
 } cc2420_header_t;
   
 /**
@@ -66,12 +73,15 @@ typedef nx_struct cc2420_footer_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;
@@ -113,10 +123,10 @@ typedef nx_struct cc2420_packet_t {
 #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