]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/adc12/Msp430Adc12P.nc
Added macros that can be used to reduce codesize (Msp430Adc12.h).
[tinyos-2.x.git] / tos / chips / msp430 / adc12 / Msp430Adc12P.nc
index 834e586f4a0e1c80cfe64cbfe9f4c158ba5645f4..e662eea537146704af97c4bcbb4096525191b8e1 100644 (file)
@@ -39,19 +39,26 @@ configuration Msp430Adc12P
   provides {
     interface Resource[uint8_t id]; 
     interface Msp430Adc12SingleChannel as SingleChannel[uint8_t id]; 
+    interface Msp430Adc12MultiChannel as MultiChannel[uint8_t id]; 
+    interface Msp430Adc12Overflow as Overflow[uint8_t id]; 
     interface AsyncStdControl as DMAExtension[uint8_t id];
   }
 } implementation { 
-  components Msp430Adc12ImplP, HplAdc12P, Msp430TimerC, MainC, HplMsp430GeneralIOC, 
+  components Msp430Adc12ImplP, HplAdc12P, MainC, 
              new SimpleRoundRobinArbiterC(MSP430ADC12_RESOURCE) as Arbiter;
 
   Resource = Arbiter;
   SingleChannel = Msp430Adc12ImplP.SingleChannel;
+  MultiChannel= Msp430Adc12ImplP.MultiChannel;
+  Overflow = Msp430Adc12ImplP.Overflow;
   DMAExtension = Msp430Adc12ImplP.DMAExtension;
   
   Msp430Adc12ImplP.Init <- MainC;
   Msp430Adc12ImplP.ADCArbiterInfo -> Arbiter;
   Msp430Adc12ImplP.HplAdc12 -> HplAdc12P;
+
+#ifdef ADC12_P6PIN_AUTO_CONFIGURE
+  components HplMsp430GeneralIOC;
   Msp430Adc12ImplP.Port60 -> HplMsp430GeneralIOC.Port60;
   Msp430Adc12ImplP.Port61 -> HplMsp430GeneralIOC.Port61;
   Msp430Adc12ImplP.Port62 -> HplMsp430GeneralIOC.Port62;
@@ -60,11 +67,15 @@ configuration Msp430Adc12P
   Msp430Adc12ImplP.Port65 -> HplMsp430GeneralIOC.Port65;
   Msp430Adc12ImplP.Port66 -> HplMsp430GeneralIOC.Port66;
   Msp430Adc12ImplP.Port67 -> HplMsp430GeneralIOC.Port67;
+#endif
 
+#ifdef ADC12_TIMERA_ENABLED
+  components Msp430TimerC;
   Msp430Adc12ImplP.TimerA -> Msp430TimerC.TimerA;
   Msp430Adc12ImplP.ControlA0 -> Msp430TimerC.ControlA0;
   Msp430Adc12ImplP.ControlA1 -> Msp430TimerC.ControlA1;
   Msp430Adc12ImplP.CompareA0 -> Msp430TimerC.CompareA0;
   Msp430Adc12ImplP.CompareA1 -> Msp430TimerC.CompareA1;
+#endif
 }