EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
ezradio_direct_receive_plugin.c
Go to the documentation of this file.
1 /***************************************************************************/
33 #include <stddef.h>
34 #include "em_device.h"
35 
36 #include "ezradio_cmd.h"
37 #include "ezradio_prop.h"
38 #include "ezradio_api_lib.h"
39 #include "ezradio_api_lib_add.h"
40 #include "ezradio_plugin_manager.h"
42 
43 #if defined( EZRADIO_PLUGIN_DIRECT_RECEIVE )
44 
45 /**************************************************************************/
57 {
58  if ( radioHandle == NULL )
59  {
61  }
62 
63  /* Read ITs, clear pending ones */
64  ezradio_get_int_status(0u, 0u, 0u, NULL);
65 
66  /* Start sending packet, channel 0, START immediately, Packet n bytes long, go READY when done */
67  ezradio_start_rx(radioHandle->directRx.channel, 0u, 0u,
68  EZRADIO_CMD_START_RX_ARG_NEXT_STATE1_RXTIMEOUT_STATE_ENUM_NOCHANGE,
69  EZRADIO_CMD_START_RX_ARG_NEXT_STATE2_RXVALID_STATE_ENUM_RX,
70  EZRADIO_CMD_START_RX_ARG_NEXT_STATE3_RXINVALID_STATE_ENUM_RX );
71 
73 }
74 
75 /**************************************************************************/
83 {
84  ezradio_change_state(EZRADIO_CMD_CHANGE_STATE_ARG_NEXT_STATE1_NEW_STATE_ENUM_READY);
85 
87 }
88 
89 #endif //#if defined( EZRADIO_PLUGIN_DIRECT_RECEIVE )
#define ECODE_EMDRV_EZRADIODRV_OK
Success return value.
void ezradio_change_state(uint8_t next_state1)
This file contains the common API library of the EZRadio and EZRadioPRO families. ...
void ezradio_get_int_status(uint8_t ph_clr_pend, uint8_t modem_clr_pend, uint8_t chip_clr_pend, ezradio_cmd_reply_t *ezradioReply)
This file contains the plug-in manager for the EZRadio and EZRadioPRO chip families.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
uint8_t channel
Direct receive channel.
EzRadio transmit plug-in managed by the plug-in manager if enabled.
EZRADIODRV_DirectRxHandle_t directRx
Direct reception plug-in handler.
void ezradio_start_rx(uint8_t channel, uint8_t condition, uint16_t rx_len, uint8_t next_state1, uint8_t next_state2, uint8_t next_state3)
uint32_t Ecode_t
Typedef for API function error code return values.
Definition: ecode.h:51
Ecode_t ezradioStartDirectReceive(EZRADIODRV_Handle_t radioHandle)
Starts direct reception with the radio configurations from the radioHandle parameter.
#define ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE
Illegal SPI handle.
Ecode_t ezradioStopDirectReceive(void)
Stops direct reception.