]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc1000/CC1000CsmaP.nc
Remove bogus 'tab:4' and 'tab:2' markers.
[tinyos-2.x.git] / tos / chips / cc1000 / CC1000CsmaP.nc
index bf9af8fb1c8ba855a5ebc1649e271f324a34509d..505f2cfa6458a20b441ffbaa79d69476c051e16f 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 
-/*                                                                     tab:4
+/*
  * "Copyright (c) 2000-2005 The Regents of the University  of California.  
  * All rights reserved.
  *
@@ -107,8 +107,8 @@ implementation
 
   task void setWakeupTask();
 
-  cc1000_metadata_t *getMetadata(message_t *amsg) {
-    return (cc1000_metadata_t *)((uint8_t *)amsg->footer + sizeof(cc1000_footer_t));
+  cc1000_metadata_t * ONE getMetadata(message_t * ONE amsg) {
+    return TCAST(cc1000_metadata_t * ONE, (uint8_t*)amsg + offsetof(message_t, footer) + sizeof(cc1000_footer_t));
   }
   
   void enterIdleState() {
@@ -160,7 +160,7 @@ implementation
     call ByteRadio.off();
   }
 
-  void setPreambleLength(message_t *msg);
+  void setPreambleLength(message_t * ONE msg);
 
   /* Initialisation, startup and stopping */
   /*--------------------------------------*/
@@ -355,7 +355,7 @@ implementation
   /* CSMA */
   /*------*/
 
-  event void ByteRadio.rts(message_t *msg) {
+  event void ByteRadio.rts(message_t * ONE msg) {
     atomic
       {
        f.txPending = TRUE;
@@ -554,7 +554,7 @@ implementation
     return sleepToDuty(s);
   }
 
-  void setPreambleLength(message_t *msg) {
+  void setPreambleLength(message_t * ONE msg) {
     cc1000_metadata_t *meta = getMetadata(msg);
     uint16_t s;
     uint32_t plen;