]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/iris/chips/rf230/HplRF230.h
rename the TRF230 timer to TRadio
[tinyos-2.x.git] / tos / platforms / iris / chips / rf230 / HplRF230.h
index c144173b95278561af987bb77e1782cff3687537..0a69cea9f1ca3e88272cbdf755e67ee812dced76 100644 (file)
@@ -50,12 +50,18 @@ enum
 /**
  * This is the timer type of the RF230 alarm interface
  */
-typedef TOne TRF230;
+typedef TOne TRadio;
+
+
+/**
+ * The number of alarm ticks per one second (921600)
+ */
+#define RF230_ALARM_SEC        ((7372800UL / MHZ / 32) * (1 << MICA_DIVIDE_ONE_FOR_32KHZ_LOG2))
 
 /**
  * The number of alarm ticks per one microsecond (0.9216)
  */
-#define RF230_ALARM_MICROSEC   ((7.3728 / MHZ / 32.0) * (1 << MICA_DIVIDE_ONE_FOR_32KHZ_LOG2))
+#define RF230_ALARM_MICROSEC   (RF230_ALARM_SEC / 1000000.0)
 
 /* This is the default value of the TX_PWR field of the PHY_TX_PWR register. */
 #ifndef RF230_DEF_RFPOWER