]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usart/Msp430Usart0C.nc
Merge over into the trunk.
[tinyos-2.x.git] / tos / chips / msp430 / usart / Msp430Usart0C.nc
index 88c633d362259d51240e8afcf3fc20486f12d1e8..0b8bdb91b115e737f1aa6f74ce01845d95fc75a3 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * Copyright (c) 2005-2006 Arch Rock Corporation
+/**
+ * Copyright (c) 2005-2006 Arched Rock Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,7 +11,7 @@
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the
  *   distribution.
- * - Neither the name of the Arch Rock Corporation nor the names of
+ * - Neither the name of the Arched Rock Corporation nor the names of
  *   its contributors may be used to endorse or promote products derived
  *   from this software without specific prior written permission.
  *
 /**
  * Provides an interface for USART0 on the MSP430.
  *
- * @author Jonathan Hui <jhui@archrock.com>
+ * @author Jonathan Hui <jhui@archedrock.com>
  * @version $Revision$ $Date$
  */
 
 generic configuration Msp430Usart0C() {
-  
+
   provides interface Resource;
   provides interface ArbiterInfo;
   provides interface HplMsp430Usart;
   provides interface HplMsp430UsartInterrupts;
+  provides interface HplMsp430I2CInterrupts;
+#ifdef __msp430_have_usart0_with_i2c
+  provides interface HplMsp430I2C;
+#endif  
+
+  uses interface ResourceConfigure;
   
 }
 
 implementation {
-  
+
   enum {
     CLIENT_ID = unique( MSP430_HPLUSART0_RESOURCE ),
   };
-  
+
   components Msp430UsartShare0P as UsartShareP;
-  
+
   Resource = UsartShareP.Resource[ CLIENT_ID ];
+  ResourceConfigure = UsartShareP.ResourceConfigure[ CLIENT_ID ];
   ArbiterInfo = UsartShareP.ArbiterInfo;
   HplMsp430UsartInterrupts = UsartShareP.Interrupts[ CLIENT_ID ];
-
-  components HplMsp430Usart0C as UsartC;
-  HplMsp430Usart = UsartC;
+  HplMsp430I2CInterrupts = UsartShareP.I2CInterrupts[ CLIENT_ID ];
+  
+  components HplMsp430Usart0C as HplUsartC;
+  HplMsp430Usart = HplUsartC;
+  
+#ifdef __msp430_have_usart0_with_i2c
+  components HplMsp430I2C0C as HplI2CC;
+  HplMsp430I2C = HplI2CC;
+#endif
   
 }