]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/tmirws/chips/scp1000/Scp1000PinsC.nc
Reorganize scp1000 driver code.
[tinyos-2.x.git] / tos / platforms / tmirws / chips / scp1000 / Scp1000PinsC.nc
index 95d36e36e42b33018f7e1ef3e1c3bfe56dcc792e..da2fb01e896aa4173f86319cb178d96c1018ec5e 100644 (file)
  
 configuration Scp1000PinsC {
   provides {
-    interface HplMsp430GeneralIO as CSn;
-    interface HplMsp430GeneralIO as PD;
-    interface HplMsp430GeneralIO as DRDY;
+    interface GeneralIO as CSn;
+    interface GeneralIO as PD;
+    interface GeneralIO as DRDY;
     interface GpioInterrupt as IntDRDY;
   }
 }
 implementation {
-#if 0
   components new Msp430GpioC() as CSn_;
   CSn = CSn_.GeneralIO;
 
-  components new Msp430GpioC() as PD_;
-  PD = PD_.GeneralIO;
-
   components new Msp430GpioC() as DRDY_;
   DRDY = DRDY_.GeneralIO;
-#endif
 
   components new Msp430InterruptC() as IntDRDY_;
   IntDRDY = IntDRDY_.Interrupt;
 
   components HplMsp430GeneralIOC as IOC;
-#if 0
   CSn_.HplGeneralIO -> IOC.Port43;
-  PD_.HplGeneralIO -> IOC.Port42;
   DRDY_.HplGeneralIO -> IOC.Port26;
-#else
-  CSn = IOC.Port43;
-  PD = IOC.Port42;
-  DRDY = IOC.Port26;
-#endif
 
   components HplMsp430InterruptC as IntC;
   IntDRDY_.HplInterrupt -> IntC.Port26;
+
+  components new Scp1000PinsP() as PinsP;
+  PD = PinsP.PD;
+  PinsP.CSn -> IOC.Port43;
+  PinsP._PD -> IOC.Port42;
+  PinsP.DRDY -> IOC.Port26;
+
+  components MainC;
+  MainC.SoftwareInit -> PinsP;
 }