]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430UartA0C.nc
Replace the special-purpose Msp430UsciConfigure interface with the
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430UartA0C.nc
index b9e6073c27a922b74dafac71fbac72518c581ffb..dd310326a84a85c8de3b2eedea432e1d211bd10c 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "Msp430Usci.h"
 
-configuration Msp430UartA0C {
+generic configuration Msp430UartA0C() {
   provides {
     interface Resource;
     interface ResourceRequested;
@@ -48,19 +48,20 @@ configuration Msp430UartA0C {
     interface UartByte;
     interface ArbiterInfo; /* ??? */
   }
-  uses interface Msp430UsciUartConfigure; /* would be nice to use Msp430UartConfigure, same as USART analog */
+  uses interface AsyncConfigure<const msp430_usci_config_t*> as
+    Msp430UsciConfigure;
 }
 implementation {
   enum {
     CLIENT_ID = unique(MSP430_USCIA0_RESOURCE)
   };
 
-  components Msp430UartP as UartP;
+  components new Msp430UartP() as UartP;
   UartStream = UartP;
   UartByte = UartP;
-  Msp430UsciUartConfigure = UartP;
+  Msp430UsciConfigure = UartP;
 
-  components new Msp430UsciA0C() as UsciC;
+  components Msp430UsciA0C as UsciC;
   Resource = UsciC.Resource[CLIENT_ID];
   ResourceRequested = UsciC.ResourceRequested[CLIENT_ID];
   ArbiterInfo = UsciC.ArbiterInfo;