]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
use new reliable atm128 async timer 0 code
authoridgay <idgay>
Mon, 26 Mar 2007 21:24:33 +0000 (21:24 +0000)
committeridgay <idgay>
Mon, 26 Mar 2007 21:24:33 +0000 (21:24 +0000)
tos/platforms/mica/AlarmCounterMilliP.nc

index 2714aade2d873a0b42e973065ffb2beace8750ba..c0a6a32f2e38419b13f73cd33f71616657111630 100644 (file)
@@ -27,26 +27,9 @@ configuration AlarmCounterMilliP
 }
 implementation
 {
-  components HplAtm128Timer0AsyncC as Timer0, PlatformC,
-    new Atm128TimerInitC(uint8_t, ATM128_CLK8_DIVIDE_32) as MilliInit,
-    new Atm128AlarmC(TMilli, uint8_t, 2) as MilliAlarm,
-    new Atm128CounterC(TMilli, uint8_t) as MilliCounter, 
-    new TransformAlarmCounterC(TMilli, uint32_t, TMilli, uint8_t, 0, uint32_t)
-      as Transform32;
+  components new Atm128AlarmAsyncC(TMilli, ATM128_CLK8_DIVIDE_32);
 
-  // Top-level interface wiring
-  AlarmMilli32 = Transform32;
-  CounterMilli32 = Transform32;
-
-  // Strap in low-level hardware timer (Timer0Async)
-  Init = MilliInit;
-  MilliInit.Timer -> Timer0.Timer;
-  MilliAlarm.HplAtm128Timer -> Timer0.Timer;
-  MilliAlarm.HplAtm128Compare -> Timer0.Compare;
-  MilliCounter.Timer -> Timer0.Timer;
-  PlatformC.SubInit -> Timer0;
-
-  // Alarm Transform Wiring
-  Transform32.AlarmFrom -> MilliAlarm;
-  Transform32.CounterFrom -> MilliCounter;
+  Init = Atm128AlarmAsyncC;
+  AlarmMilli32 = Atm128AlarmAsyncC;
+  CounterMilli32 = Atm128AlarmAsyncC;
 }