EFM32 Giant Gecko Software Documentation  efm32gg-doc-5.1.2
ezradio_direct_transmit_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_TRANSMIT )
44 
45 /**************************************************************************/
57 {
58  ezradio_cmd_reply_t ezradioReply;
59 
60  if ( radioHandle == NULL )
61  {
63  }
64 
65  /* Request and check radio device state */
66  ezradio_request_device_state(&ezradioReply);
67 
68  if (ezradioReply.REQUEST_DEVICE_STATE.CURR_STATE == EZRADIO_CMD_REQUEST_DEVICE_STATE_REP_CURR_STATE_MAIN_STATE_ENUM_TX) {
70  }
71 
72  /* Read ITs, clear pending ones */
73  ezradio_get_int_status(0u, 0u, 0u, NULL);
74 
75  /* Start sending packet, channel 0, START immediately, Packet n bytes long, go READY when done */
76  ezradio_start_tx(radioHandle->directTx.channel, 0u, 0u);
77 
79 }
80 
81 /**************************************************************************/
89 {
90  ezradio_change_state(EZRADIO_CMD_CHANGE_STATE_ARG_NEXT_STATE1_NEW_STATE_ENUM_READY);
91 
93 }
94 
95 #endif //#if defined( EZRADIO_PLUGIN_DIRECT_TRANSMIT )
#define ECODE_EMDRV_EZRADIODRV_TRANSMIT_FAILED
Unable to start transmission.
#define ECODE_EMDRV_EZRADIODRV_OK
Success return value.
Ecode_t ezradioStartDirectTransmit(EZRADIODRV_Handle_t radioHandle)
Starts direct transmission with the radio configurations from the radioHandle parameter.
void ezradio_change_state(uint8_t next_state1)
This file contains the common API library of the EZRadio and EZRadioPRO families. ...
void ezradio_start_tx(uint8_t channel, uint8_t condition, uint16_t tx_len)
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.
EzRadio transmit plug-in managed by the plug-in manager if enabled.
uint32_t Ecode_t
Typedef for API function error code return values.
Definition: ecode.h:51
Ecode_t ezradioStopDirectTransmit(void)
Stops direct transmission.
EZRADIODRV_DirectTxHandle_t directTx
Direct transmission plug-in handler.
#define ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE
Illegal SPI handle.
uint8_t channel
Direct transmit channel.
void ezradio_request_device_state(ezradio_cmd_reply_t *ezradioReply)