Interface: moteiv.tos.lib.CC2420Radio.HPLCC2420FIFO

interface HPLCC2420FIFO

FIFO Access to the CC2420 transceiver.

Author:
Joe Polastre, Moteiv Corporation <info@moteiv.com>

Commands
command result_t readRXFIFO(uint8_t rh, uint8_t length, uint8_t *data) Read from the RX FIFO queue.
command result_t writeTXFIFO(uint8_t rh, uint8_t length, uint8_t *data) Writes a series of bytes to the transmit FIFO.

Events
event result_t RXFIFODone(uint8_t length, uint8_t *data) Notification that a byte from the RX FIFO has been received.
event result_t TXFIFODone(uint8_t length, uint8_t *data) Notification that the bytes have been written to the FIFO and if the write was successful.

Commands - Details

readRXFIFO

command result_t readRXFIFO(uint8_t rh, uint8_t length, uint8_t *data)

Read from the RX FIFO queue. Will read bytes from the queue until the length is reached (determined by the first byte read). RXFIFODone() is signalled when all bytes have been read or the end of the packet has been reached.

Parameters:
rh - either RESOURCE_NONE for automatic resource scheduling or a resource handle acquired by CC2420ResourceC
length - number of bytes requested from the FIFO
data - buffer bytes should be placed into
Returns:
SUCCESS if the bus is free to read from the FIFO

writeTXFIFO

command result_t writeTXFIFO(uint8_t rh, uint8_t length, uint8_t *data)

Writes a series of bytes to the transmit FIFO.

Parameters:
rh - either RESOURCE_NONE for automatic resource scheduling or a resource handle acquired by CC2420ResourceC
length - length of data to be written
data - the first byte of data
Returns:
SUCCESS if the bus is free to write to the FIFO

Events - Details

RXFIFODone

event result_t RXFIFODone(uint8_t length, uint8_t *data)

Notification that a byte from the RX FIFO has been received.

Parameters:
length - number of bytes actually read from the FIFO
data - buffer the bytes were read into
Returns:
SUCCESS

TXFIFODone

event result_t TXFIFODone(uint8_t length, uint8_t *data)

Notification that the bytes have been written to the FIFO and if the write was successful.

Parameters:
length - number of bytes written to the fifo queue
data - the buffer written to the fifo queue
Returns:
SUCCESS