cc2538_rf_internal.h File Reference

Internal interfaces for the cc2538_rf driver. More...

Detailed Description

Internal interfaces for the cc2538_rf driver.

Author
Aaron Sowry aaron.nosp@m.@mut.nosp@m.ex.nz

Definition in file cc2538_rf_internal.h.

Go to the source code of this file.

#define CC2538_RX_FIFO_ADDR   0x40088000
 
#define CC2538_TX_FIFO_ADDR   0x40088200
 
uint_fast8_t rfcore_read_byte (void)
 Read a single byte from the RX FIFO. More...
 
uint_fast8_t rfcore_peek_rx_fifo (int idx)
 Peek a single byte from the RX FIFO. More...
 
void rfcore_read_fifo (void *buf, uint_fast8_t len)
 Read the remaining unread data from the RX FIFO. More...
 
void rfcore_strobe (uint_fast8_t instr)
 Issue a command strobe from the CPU to the radio. More...
 
void rfcore_write_byte (uint_fast8_t byte)
 Write a single byte to the next index of the TX FIFO. More...
 
void rfcore_poke_tx_fifo (int idx, uint_fast8_t byte)
 Poke a single byte in the TX FIFO. More...
 
void rfcore_write_fifo (const void *buf, uint_fast8_t len)
 Write a string of bytes to the TX FIFO. More...
 
bool RFCORE_ASSERT_failure (const char *expr, const char *func, int line)
 

Function Documentation

◆ rfcore_peek_rx_fifo()

uint_fast8_t rfcore_peek_rx_fifo ( int  idx)

Peek a single byte from the RX FIFO.

Peeking, as opposed to reading, a byte from the RX FIFO will not advance the FIFO pointer. Further, bytes may be read from any position in the FIFO by providing an index.

Parameters
[in]idxThe index of the byte to peek
Returns
The byte at index idx

◆ rfcore_poke_tx_fifo()

void rfcore_poke_tx_fifo ( int  idx,
uint_fast8_t  byte 
)

Poke a single byte in the TX FIFO.

Poking, as opposed to writing, a byte to the TX FIFO will not advance the FIFO pointer. Further, bytes may be written to any position in the FIFO by providing an index.

Parameters
[in]idxThe index of the byte to write to
[in]byteThe byte to write

◆ rfcore_read_byte()

uint_fast8_t rfcore_read_byte ( void  )

Read a single byte from the RX FIFO.

This function will return the first currently unread byte from the RX FIFO, and advance the FIFO pointer by one. Hence, subsequent calls to this function will return subsequent bytes from the RX FIFO.

Returns
The first currently unread byte from the RX FIFO

◆ rfcore_read_fifo()

void rfcore_read_fifo ( void *  buf,
uint_fast8_t  len 
)

Read the remaining unread data from the RX FIFO.

Parameters
[out]bufThe buffer to read the data into
[in]lenThe maximum length of the buffer

◆ rfcore_strobe()

void rfcore_strobe ( uint_fast8_t  instr)

Issue a command strobe from the CPU to the radio.

Parameters
[in]instrThe instruction to issue

◆ rfcore_write_byte()

void rfcore_write_byte ( uint_fast8_t  byte)

Write a single byte to the next index of the TX FIFO.

Parameters
[in]byteThe byte to write

◆ rfcore_write_fifo()

void rfcore_write_fifo ( const void *  buf,
uint_fast8_t  len 
)

Write a string of bytes to the TX FIFO.

Parameters
[in]bufThe buffer containing the data to write
[in]lenThe length of the data to write