Interface: tos.chips.cc1000.HplCC1000Spi

interface HplCC1000Spi

Interface to the CC1000 chip's serial bus. This isn't really an SPI, but the mica2 interface was done using the Atmega128 SPI hardware. Hence the name.

Author:
Jaein Jeong
Philip buonadonna

Commands
command void disableIntr() Disable CC1000 bus interrupts.
command void enableIntr() Enable dataReady events on every byte sent or received from the CC1000 bus.
command void initSlave() Initialise the interface to the CC1000 bus.
command bool isBufBusy() Is write buffer busy with the last transmission?
command uint8_t readByte() Get the last byte received from the CC1000 bus.
command void rxMode() Switch the interface to the CC1000 bus to "receive" mode.
command void txMode() Switch the interface to the CC1000 bus "transmit" mode.
command void writeByte(uint8_t data) Write a byte to the CC1000 bus.

Events
event void dataReady(uint8_t data) If enableIntr() is called, this event will be signaled every 8 CC1000 data clocks.

Commands - Details

disableIntr

command void disableIntr()

Disable CC1000 bus interrupts.

enableIntr

command void enableIntr()

Enable dataReady events on every byte sent or received from the CC1000 bus. After this is called, dataReady events will be signaled every 8 CC1000 data clocks.

initSlave

command void initSlave()

Initialise the interface to the CC1000 bus.

isBufBusy

command bool isBufBusy()

Is write buffer busy with the last transmission?

Returns:
TRUE if the buffer is busy, FALSE otherwise.

readByte

command uint8_t readByte()

Get the last byte received from the CC1000 bus.

Returns:
Last byte received.

rxMode

command void rxMode()

Switch the interface to the CC1000 bus to "receive" mode.

txMode

command void txMode()

Switch the interface to the CC1000 bus "transmit" mode.

writeByte

command void writeByte(uint8_t data)

Write a byte to the CC1000 bus.

Parameters:
data - Byte to write.

Events - Details

dataReady

event void dataReady(uint8_t data)

If enableIntr() is called, this event will be signaled every 8 CC1000 data clocks.

Parameters:
data - In "receive" mode, the last value received from the CC1000 bus.