]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430UartA0C.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430UartA0C.nc
index 6bb9709571fa207d606131aed9f792ec85a2a960..bbdf8a45877f44598c414ba4951b8ba9722dc7fb 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /**
  * This configuration provides the interface for using USCI_A0 in its UART
  * mode.
  *
- * @author R. Steve McKown <smckown@gmail.com>
+ * @author R. Steve McKown <rsmckown@gmail.com>
  */
+
 #if !defined(__MSP430_HAS_USCI_AB0__)
 #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 AsyncConfigure<const msp430_usci_uart_t*> as Configure;
 }
 implementation {
   enum {
     CLIENT_ID = unique(MSP430_USCIA0_RESOURCE)
   };
 
-  components Msp430UartP as UartP;
+  components new Msp430UartP() as UartP;
   UartStream = UartP;
   UartByte = UartP;
-  Msp430UsciUartConfigure = UartP;
+  Configure = UartP;
 
-  components new Msp430UsciA0C() as UsciC;
+  components Msp430UsciA0C as UsciC;
   Resource = UsciC.Resource[CLIENT_ID];
   ResourceRequested = UsciC.ResourceRequested[CLIENT_ID];
   ArbiterInfo = UsciC.ArbiterInfo;