-/*
- * 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.
*
* transfers in software. To utilize the DMA, use Msp430SpiDma0P in
* place of Msp430SpiNoDma0P.
*
- * @author Jonathan Hui <jhui@archrock.com>
+ * @author Jonathan Hui <jhui@archedrock.com>
+ * @author Mark Hays
* @version $Revision$ $Date$
*/
-#include "msp430UsartResource.h"
+#include "msp430usart.h"
generic configuration Msp430Spi0C() {
-
+
provides interface Resource;
+ provides interface ResourceRequested;
provides interface SpiByte;
provides interface SpiPacket;
-
+
+ uses interface Msp430SpiConfigure;
}
implementation {
-
+
enum {
CLIENT_ID = unique( MSP430_SPIO_BUS ),
};
-
+
+#ifdef ENABLE_SPI0_DMA
+#warning "Enabling SPI DMA on USART0"
+ components Msp430SpiDma0P as SpiP;
+#else
components Msp430SpiNoDma0P as SpiP;
+#endif
+
Resource = SpiP.Resource[ CLIENT_ID ];
SpiByte = SpiP.SpiByte;
SpiPacket = SpiP.SpiPacket[ CLIENT_ID ];
+ Msp430SpiConfigure = SpiP.Msp430SpiConfigure[ CLIENT_ID ];
components new Msp430Usart0C() as UsartC;
+ ResourceRequested = UsartC;
+ SpiP.ResourceConfigure[ CLIENT_ID ] <- UsartC.ResourceConfigure;
SpiP.UsartResource[ CLIENT_ID ] -> UsartC.Resource;
SpiP.UsartInterrupts -> UsartC.HplMsp430UsartInterrupts;
-
+
}