]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncC.nc
Fixed timer system to follow new implementation from DGay.
[tinyos-2.x.git] / tos / chips / atm128 / timer / sim / HplAtm128Timer0AsyncC.nc
index dc32120e1ea49d93652c360a8b2d518ed84e2a7c..4cc1f607cdf96d1c0bc32a4575fa6cd7d496ded8 100644 (file)
 configuration HplAtm128Timer0AsyncC
 {
   provides {
-    interface Init @atleastonce();
     // 8-bit Timers
     interface HplAtm128Timer<uint8_t>   as Timer;
     interface HplAtm128TimerCtrl8       as TimerCtrl;
     interface HplAtm128Compare<uint8_t> as Compare;
+    interface HplAtm128TimerAsync       as TimerAsync;
   }
 }
 implementation {
-  components HplAtm128Counter0C, new HplAtm128CompareC(uint8_t,
-                                                ATM128_OCR0,
-                                                ATM128_TIMSK,
-                                                OCIE0,
-                                                ATM128_TIFR,
-                                                OCF0);
-
-  Init = HplAtm128Counter0C;
-  Timer = HplAtm128Counter0C;
-  TimerCtrl = HplAtm128Counter0C;
-  Compare = HplAtm128CompareC;
-
-  HplAtm128CompareC.Timer -> HplAtm128Counter0C;
-  HplAtm128CompareC.TimerCtrl -> HplAtm128Counter0C;
-  HplAtm128CompareC.Notify -> HplAtm128Counter0C;
-  
+  components HplAtm128Timer0AsyncP;
+  Timer = HplAtm128Timer0AsyncP;
+  TimerCtrl = HplAtm128Timer0AsyncP;
+  Compare = HplAtm128Timer0AsyncP;
+  TimerAsync = HplAtm128Timer0AsyncP;
 }