EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
COMM_Layer

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 278 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
byteCountNumber of bytes to get from the radio chip
pDataPointer to where to put the data
Returns
CTS value

Definition at line 54 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
cmdCommand ID
pollCtsSet to poll CTS
byteCountNumber of bytes to get from the radio chip.
pDataPointer to where to put the data.

Definition at line 164 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
cmdCommand ID
pollCtsSet to poll CTS
byteCountNumber of bytes to get from the radio chip
pDataPointer to where to put the data

Definition at line 207 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 44 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().