aversive_10-03-12/modules/devices/radio/cc2420/cc2420.h File Reference

Go to the source code of this file.

Defines

#define CC2420_STATUS_CHECK(bit)   ((cc2420_get_status() & _BV(bit)) >> (bit))

Functions

void cc2420_init (void)
uint8_t cc2420_get_status (void)
uint8_t cc2420_strobe_register (uint8_t reg)
uint16_t cc2420_read_register (uint8_t reg)
void cc2420_write_register (uint8_t reg, uint16_t value)
uint8_t cc2420_write_txfifo (uint8_t *buffer, uint8_t length)
uint8_t cc2420_write_rxfifo (uint8_t *buffer, uint8_t length)
void cc2420_read_rxfifo (uint8_t *buffer, uint8_t length)
void cc2420_write_ram (uint16_t addr, uint8_t *buffer, uint16_t length)
void cc2420_read_ram (uint16_t addr, uint8_t *buffer, uint16_t length)


Define Documentation

#define CC2420_STATUS_CHECK ( bit   )     ((cc2420_get_status() & _BV(bit)) >> (bit))

Definition at line 29 of file cc2420.h.

Referenced by cc2420_init().


Function Documentation

uint8_t cc2420_get_status ( void   ) 

Definition at line 49 of file cc2420.c.

References SLAVE_DESELECT, SLAVE_SELECT, SNOP, and spi_send_and_receive_byte().

Referenced by main().

void cc2420_init ( void   ) 

void cc2420_read_ram ( uint16_t  addr,
uint8_t *  buffer,
uint16_t  length 
)

Definition at line 192 of file cc2420.c.

References BANK_MASK, i, RAM_BIT, RAM_MASK, RAM_READ, SLAVE_DESELECT, SLAVE_SELECT, spi_receive_byte(), and spi_send_byte().

Referenced by main().

uint16_t cc2420_read_register ( uint8_t  reg  )  [inline]

Definition at line 74 of file cc2420.c.

References READ_BIT, REG_BIT, REG_MASK, SLAVE_DESELECT, SLAVE_SELECT, spi_receive_byte(), and spi_send_byte().

Referenced by main().

void cc2420_read_rxfifo ( uint8_t *  buffer,
uint8_t  length 
)

Definition at line 153 of file cc2420.c.

References i, READ_BIT, REG_BIT, RXFIFO, SLAVE_DESELECT, SLAVE_SELECT, spi_receive_byte(), and spi_send_byte().

Referenced by main().

uint8_t cc2420_strobe_register ( uint8_t  reg  )  [inline]

Definition at line 62 of file cc2420.c.

References SLAVE_DESELECT, SLAVE_SELECT, and spi_send_and_receive_byte().

void cc2420_write_ram ( uint16_t  addr,
uint8_t *  buffer,
uint16_t  length 
)

Definition at line 174 of file cc2420.c.

References BANK_MASK, i, RAM_BIT, RAM_MASK, RAM_READ_WRITE, SLAVE_DESELECT, SLAVE_SELECT, and spi_send_byte().

Referenced by main().

void cc2420_write_register ( uint8_t  reg,
uint16_t  value 
) [inline]

Definition at line 90 of file cc2420.c.

References REG_BIT, REG_MASK, SLAVE_DESELECT, SLAVE_SELECT, spi_send_byte(), and WRITE_BIT.

Referenced by main().

uint8_t cc2420_write_rxfifo ( uint8_t *  buffer,
uint8_t  length 
)

Definition at line 130 of file cc2420.c.

References i, REG_BIT, RXFIFO, SFLUSHRX, SLAVE_DESELECT, SLAVE_SELECT, spi_send_and_receive_byte(), spi_send_byte(), and WRITE_BIT.

Referenced by main().

uint8_t cc2420_write_txfifo ( uint8_t *  buffer,
uint8_t  length 
)


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6