avrora.sim.radio
Class CC1000Radio.ATMega128LController

java.lang.Object
  extended byavrora.sim.radio.CC1000Radio.ATMega128LController
All Implemented Interfaces:
ATMega128L.ADCInput, ATMega128L.SPIDevice, Radio.RadioController
Enclosing class:
CC1000Radio

public class CC1000Radio.ATMega128LController
extends java.lang.Object
implements Radio.RadioController, ATMega128L.SPIDevice, ATMega128L.ADCInput

A CC1000 Controller class for the ATMega128L microcontroller cpu. Installing an ATMega128L into this class connects the microcontroller to this radio. Data is communicated over the SPI interface, on which the CC1000 is the master. RSSI data from the CC1000 is available to the ATMega128L though the ADC (analog to digital converter).


Nested Class Summary
protected  class CC1000Radio.ATMega128LController.Transmit
          Transmit is an event that transmits a packet of data after a one bit period delay.
 
Nested classes inherited from class avrora.sim.mcu.ATMega128L.SPIDevice
ATMega128L.SPIDevice.SPIFrame
 
Field Summary
 ATMega128L.SPIDevice connectedDevice
           
 
Method Summary
 void connect(ATMega128L.SPIDevice d)
           
 void disable()
          Disable transfers.
 void enable()
          Enable transfers.
 int getLevel()
          Report the current voltage level of the input.
 void install(Microcontroller mcu)
          Installs this Controller into a microcontroller.
 void receiveFrame(ATMega128L.SPIDevice.SPIFrame frame)
          receiveFrame receives an SPIFrame from a connected device.
 ATMega128L.SPIDevice.SPIFrame transmitFrame()
          Transmits an SPIFrame to be received by the connected device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectedDevice

public ATMega128L.SPIDevice connectedDevice
Method Detail

enable

public void enable()
Description copied from interface: Radio.RadioController
Enable transfers.

Specified by:
enable in interface Radio.RadioController

disable

public void disable()
Description copied from interface: Radio.RadioController
Disable transfers.

Specified by:
disable in interface Radio.RadioController

receiveFrame

public void receiveFrame(ATMega128L.SPIDevice.SPIFrame frame)
receiveFrame receives an SPIFrame from a connected device. If the radio is in a transmission state, this should be the next frame sent into the air.

Specified by:
receiveFrame in interface ATMega128L.SPIDevice
Parameters:
frame - the frame to be received

transmitFrame

public ATMega128L.SPIDevice.SPIFrame transmitFrame()
Transmits an SPIFrame to be received by the connected device. This frame is either the last byte of data received or a zero byte.

Specified by:
transmitFrame in interface ATMega128L.SPIDevice
Returns:
the frame for transmission

connect

public void connect(ATMega128L.SPIDevice d)
Specified by:
connect in interface ATMega128L.SPIDevice

getLevel

public int getLevel()
Description copied from interface: ATMega128L.ADCInput
Report the current voltage level of the input.

Specified by:
getLevel in interface ATMega128L.ADCInput

install

public void install(Microcontroller mcu)
Description copied from interface: Radio.RadioController
Installs this Controller into a microcontroller. This should setup the pins, IO registers in such a way that changes to CPU state will make corresponding changes to the RadioController state that will initiate sends and receives if necessary.

Specified by:
install in interface Radio.RadioController