]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/adc12/Msp430Adc12ClientAutoRVGC.nc
Added a generic that generates a nesC warning if someone wired to RefVolt arbiter
[tinyos-2.x.git] / tos / chips / msp430 / adc12 / Msp430Adc12ClientAutoRVGC.nc
index 97cc789aa92962eb117a00faf8fd7f8b2a979141..246f5860859b37a6ed64169723c21951a984444f 100644 (file)
  * @see  Please refer to the README.txt and TEP 101 for more information about\r
  * this component and its intended use.\r
  */\r
-\r
+#include <Msp430Adc12.h> \r
 generic configuration Msp430Adc12ClientAutoRVGC()\r
 {\r
   provides {\r
     interface Resource;\r
     interface Msp430Adc12SingleChannel;\r
+    interface Msp430Adc12MultiChannel;\r
   }\r
   uses interface AdcConfigure<const msp430adc12_channel_config_t*>;\r
 } implementation {\r
@@ -55,7 +56,11 @@ generic configuration Msp430Adc12ClientAutoRVGC()
   };\r
   Resource = Msp430RefVoltArbiterP.ClientResource[ID];\r
   Msp430Adc12SingleChannel = Msp430Adc12P.SingleChannel[ID];\r
+  Msp430Adc12MultiChannel = Msp430Adc12P.MultiChannel[ID];\r
   \r
   Msp430RefVoltArbiterP.AdcResource[ID] -> Msp430Adc12P.Resource[ID];\r
-  AdcConfigure = Msp430RefVoltArbiterP.Config[ID]; \r
+\r
+  components new Msp430Adc12ConfAlertC();\r
+  AdcConfigure = Msp430Adc12ConfAlertC.ConfUp;\r
+  Msp430RefVoltArbiterP.Config[ID] -> Msp430Adc12ConfAlertC.ConfSub; \r
 }\r