]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430UartA0C.nc
Update Msp430UartA0C.nc to match recent changes in Msp430UartA1C. Spruce up
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430UartA0C.nc
index 4c07faa688d9007d44a4d42077fa54adf2743e2b..e8e661450566ced3786377f4cfb2d9821b7844e6 100644 (file)
@@ -38,7 +38,9 @@
 #error "Target does not have a USCI_A0 peripheral (UART)"
 #endif
 
-configuration Msp430UartA0C {
+#include "Msp430Usci.h"
+
+generic configuration Msp430UartA0C() {
   provides {
     interface Resource;
     interface ResourceRequested;
@@ -46,19 +48,19 @@ configuration Msp430UartA0C {
     interface UartByte;
     interface ArbiterInfo; /* ??? */
   }
-  uses interface Msp430UsciUartConfigure; /* would be nice to use Msp430UartConfigure, same as USART analog */
+  uses interface 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;
@@ -66,4 +68,8 @@ implementation {
   UartP -> UsciC.Interrupts[CLIENT_ID];
   UartP -> UsciC.ArbiterInfo;
   UsciC.ResourceConfigure[CLIENT_ID] -> UartP;
+
+  components HplMsp430GeneralIOC as IOC;
+  UartP.RXD -> IOC.UCA0RXD;
+  UartP.TXD -> IOC.UCA0TXD;
 }