avrora.sim.mcu
Interface SPIDevice

All Known Implementing Classes:
CC1000Radio.ATMegaController, SPI

public interface SPIDevice

Interface for devices that can connect to the SPI. Rather than communicating over the MISO, MOSI pins, the process is expedited and simplified through the use of the transmitFrame() and receiveFrame() methods in the intefact.


Method Summary
 void connect(SPIDevice d)
          The connect() method connects this SPI device to the specified SPIDevice.
 void receiveFrame(SPI.Frame frame)
          Receive a frame.
 SPI.Frame transmitFrame()
          Transmit a frame from this device.
 

Method Detail

transmitFrame

public SPI.Frame transmitFrame()
Transmit a frame from this device.

Returns:
the frame for transmission

receiveFrame

public void receiveFrame(SPI.Frame frame)
Receive a frame.

Parameters:
frame - the frame to be received

connect

public void connect(SPIDevice d)
The connect() method connects this SPI device to the specified SPIDevice.

Parameters:
d - the device to connect to.