]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/shimmer2/chips/cc2420/HplCC2420InterruptsC.nc
added author credit for re-write.
[tinyos-2.x.git] / tos / platforms / shimmer2 / chips / cc2420 / HplCC2420InterruptsC.nc
index c1227f3439434a35532817217e9faf99aa66118f..c4b2ad46726fd323dabc82922e312e499dce9dbe 100644 (file)
  *
  * @author Konrad Lorincz
  * @date May 14, 2008
+ * re-written to use interrupt-driven sfd capture; 
+ * shimmer2 does not have sfd wired to a timer pin
+ * @author Steve Ayer
+ * @date January, 2010
  */
 
 configuration HplCC2420InterruptsC {
 
   provides interface GpioCapture as CaptureSFD;
+  provides interface GpioInterrupt as InterruptSFD;
+
   provides interface GpioInterrupt as InterruptCCA;
   provides interface GpioInterrupt as InterruptFIFOP;
 
@@ -53,20 +59,26 @@ configuration HplCC2420InterruptsC {
 
 implementation {
 
-  components HplMsp430GeneralIOC as GeneralIOC;
-  components Msp430TimerC;
-  components new GpioCaptureC() as CaptureSFDC;
-  CaptureSFDC.Msp430TimerControl -> Msp430TimerC.ControlA1;
-  CaptureSFDC.Msp430Capture -> Msp430TimerC.CaptureA1;
-  CaptureSFDC.GeneralIO -> GeneralIOC.Port10;
-
   components HplMsp430InterruptC;
   components new Msp430InterruptC() as InterruptCCAC;
   components new Msp430InterruptC() as InterruptFIFOPC;
+  components new Msp430InterruptC() as InterruptSFDC;
+
   InterruptCCAC.HplInterrupt -> HplMsp430InterruptC.Port27;
   InterruptFIFOPC.HplInterrupt -> HplMsp430InterruptC.Port12;
+  InterruptSFDC.HplInterrupt -> HplMsp430InterruptC.Port10;
+
+  components HplCC2420InterruptsP;
+  components LocalTimeMilliC;
+  components new GpioCaptureC() as CaptureSFDC;
+  components HplCC2420PinsC;
+
+  CaptureSFD = HplCC2420InterruptsP.CaptureSFD;
+
+  HplCC2420InterruptsP.InterruptSFD ->  InterruptSFDC.Interrupt;
+  HplCC2420InterruptsP.LocalTime     -> LocalTimeMilliC;
 
-  CaptureSFD = CaptureSFDC.Capture;
   InterruptCCA = InterruptCCAC.Interrupt;
   InterruptFIFOP = InterruptFIFOPC.Interrupt;
+  InterruptSFD = InterruptSFDC.Interrupt;
 }