Detailed Description

EzRadio Communication Layer


     

.

Functions

void ezradio_comm_ClearCTS (void)
uint8_t ezradio_comm_GetResp (uint8_t byteCount, uint8_t *pData)
uint8_t ezradio_comm_PollCTS (void)
void ezradio_comm_ReadData (uint8_t cmd, uint8_t pollCts, uint8_t byteCount, uint8_t *pData)
void ezradio_comm_SendCmd (uint8_t byteCount, uint8_t *pData)
uint8_t ezradio_comm_SendCmdGetResp (uint8_t cmdByteCount, uint8_t *pCmdData, uint8_t respByteCount, uint8_t *pRespData)
void ezradio_comm_WriteData (uint8_t cmd, uint8_t pollCts, uint8_t byteCount, uint8_t *pData)

Variables

uint8_t ezradio_comm_CtsWentHigh

Function Documentation

void ezradio_comm_ClearCTS ( void )

Clears the CTS state variable.

Definition at line 261 of file ezradio_comm.c .

References ezradio_comm_CtsWentHigh .

Referenced by ezradio_reset() .

uint8_t ezradio_comm_GetResp ( uint8_t byteCount,
uint8_t * pData
)

Gets a command response from the radio chip

Parameters
byteCount Number of bytes to get from the radio chip
pData Pointer to where to put the data
Returns
CTS value

Definition at line 52 of file ezradio_comm.c .

References ezradio_comm_CtsWentHigh , ezradio_hal_ClearNsel() , ezradio_hal_SetNsel() , ezradio_hal_SpiReadByte() , ezradio_hal_SpiReadData() , ezradio_hal_SpiWriteByte() , ezradio_hal_SpiWriteReadData() , and EZRADIODRV_COMM_CTS_RETRY .

Referenced by ezradio_comm_PollCTS() , and ezradio_comm_SendCmdGetResp() .

uint8_t ezradio_comm_PollCTS ( void )
void ezradio_comm_ReadData ( uint8_t cmd,
uint8_t pollCts,
uint8_t byteCount,
uint8_t * pData
)

Gets a command response from the radio chip

Parameters
cmd Command ID
pollCts Set to poll CTS
byteCount Number of bytes to get from the radio chip.
pData Pointer to where to put the data.

Definition at line 156 of file ezradio_comm.c .

References ezradio_comm_CtsWentHigh , ezradio_comm_PollCTS() , ezradio_hal_ClearNsel() , ezradio_hal_SetNsel() , ezradio_hal_SpiReadData() , ezradio_hal_SpiWriteByte() , and ezradio_hal_SpiWriteReadData() .

Referenced by ezradio_frr_a_read() , ezradio_frr_b_read() , ezradio_frr_c_read() , ezradio_frr_d_read() , and ezradio_read_rx_fifo() .

uint8_t ezradio_comm_SendCmdGetResp ( uint8_t cmdByteCount,
uint8_t * pCmdData,
uint8_t respByteCount,
uint8_t * pRespData
)
void ezradio_comm_WriteData ( uint8_t cmd,
uint8_t pollCts,
uint8_t byteCount,
uint8_t * pData
)

Gets a command response from the radio chip

Parameters
cmd Command ID
pollCts Set to poll CTS
byteCount Number of bytes to get from the radio chip
pData Pointer to where to put the data

Definition at line 195 of file ezradio_comm.c .

References ezradio_comm_CtsWentHigh , ezradio_comm_PollCTS() , ezradio_hal_ClearNsel() , ezradio_hal_SetNsel() , ezradio_hal_SpiWriteByte() , and ezradio_hal_SpiWriteData() .

Referenced by ezradio_write_ezconfig_array() , and ezradio_write_tx_fifo() .

Variable Documentation

uint8_t ezradio_comm_CtsWentHigh

Can be used to prevent CTS check before any communication command.

Definition at line 42 of file ezradio_comm.c .

Referenced by ezradio_comm_ClearCTS() , ezradio_comm_GetResp() , ezradio_comm_PollCTS() , ezradio_comm_ReadData() , ezradio_comm_SendCmd() , ezradio_comm_WriteData() , and ezradio_ezconfig_check() .