-/*
- * 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
* 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
}