* (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_B0 in its SPI
* mode.
*
* @author R. Steve McKown <rsmckown@gmail.com>
*/
-
+
#if !defined(__MSP430_HAS_USCI_AB0__)
#error "Target does not have a USCI_B0 peripheral (SPI)"
#endif
interface SpiPacket;
interface ArbiterInfo; /* ??? */
}
- uses interface AsyncConfigure<const msp430_usci_spi_t*> as Configure;
+ uses {
+ interface AsyncConfigure<const msp430_usci_spi_t*> as Configure;
+ interface GeneralIO as CSn; /* wire only if a SPI slave only */
+ }
}
implementation {
enum {
SpiByte = SpiP;
SpiPacket = SpiP;
Configure = SpiP;
+ CSn = SpiP;
components Msp430UsciB0C as UsciC;
Resource = UsciC.Resource[CLIENT_ID];
SpiP.SIMO -> IOC.UCB0SIMO;
SpiP.SOMI -> IOC.UCB0SOMI;
SpiP.CLK -> IOC.UCB0CLK;
-
-#ifdef SPI_DEBUG
- components PlatformSerialC;
- SpiP.UartByte -> PlatformSerialC;
-#endif
}