]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
LocalTimeMilliC + msp430 support therefore
authoridgay <idgay>
Wed, 23 May 2007 21:58:08 +0000 (21:58 +0000)
committeridgay <idgay>
Wed, 23 May 2007 21:58:08 +0000 (21:58 +0000)
tos/chips/msp430/timer/HilTimerMilliC.nc
tos/system/LocalTimeMilliC.nc [new file with mode: 0644]

index caa2180a6747d9dd8c9f2bb356e91b5c1bbc1147..9028414f98438d4b6451c71935614093cdc7612e 100644 (file)
@@ -33,16 +33,21 @@ configuration HilTimerMilliC
 {
   provides interface Init;
   provides interface Timer<TMilli> as TimerMilli[ uint8_t num ];
+  provides interface LocalTime<TMilli>;
 }
 implementation
 {
   components new AlarmMilli32C();
   components new AlarmToTimerC(TMilli);
   components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI));
+  components new CounterToLocalTimeC(TMilli);
+  components CounterMilli32C;
 
   Init = AlarmMilli32C;
   TimerMilli = VirtualizeTimerC;
+  LocalTime = CounterToLocalTimeC;
 
   VirtualizeTimerC.TimerFrom -> AlarmToTimerC;
   AlarmToTimerC.Alarm -> AlarmMilli32C;
+  CounterToLocalTimeC.Counter -> CounterMilli32C;
 }
diff --git a/tos/system/LocalTimeMilliC.nc b/tos/system/LocalTimeMilliC.nc
new file mode 100644 (file)
index 0000000..ae8d73d
--- /dev/null
@@ -0,0 +1,27 @@
+/* $Id$
+ * Copyright (c) 2007 Intel Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached INTEL-LICENSE     
+ * file. If you do not find these files, copies can be found by writing to
+ * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA, 
+ * 94704.  Attention:  Intel License Inquiry.
+ *
+ */
+/**
+ * Provide current time via the LocalTime<TMilli> interface.
+ *
+ * @author David Gay
+ */
+
+#include "Timer.h"
+
+configuration LocalTimeMilliC {
+  provides interface LocalTime<TMilli>;
+}
+implementation
+{
+  components HilTimerMilliC;
+
+  LocalTime = HilTimerMilliC;
+}