EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
ezradio_unmod_carrier_plugin.c
Go to the documentation of this file.
1 /***************************************************************************/
34 #include <stddef.h>
35 #include "em_device.h"
36 
37 #include "ezradio_cmd.h"
38 #include "ezradio_prop.h"
39 #include "ezradio_api_lib.h"
40 #include "ezradio_api_lib_add.h"
41 #include "ezradio_plugin_manager.h"
43 
44 #if defined( EZRADIO_PLUGIN_UNMOD_CARRIER )
45 
46 /**************************************************************************/
58 {
59  ezradio_cmd_reply_t ezradioReply;
60 
61  if ( radioHandle == NULL )
62  {
64  }
65 
66  /* Request and check radio device state */
67  ezradio_request_device_state(&ezradioReply);
68 
69  if (ezradioReply.REQUEST_DEVICE_STATE.CURR_STATE == EZRADIO_CMD_REQUEST_DEVICE_STATE_REP_CURR_STATE_MAIN_STATE_ENUM_TX) {
71  }
72 
73  /* Read ITs, clear pending ones */
74  ezradio_get_int_status(0u, 0u, 0u, NULL);
75 
76  /* Start sending packet, channel 0, START immediately, Packet n bytes long, go READY when done */
77  ezradio_start_tx(radioHandle->unmodCarrier.channel, 0u, 0u);
78 
80 }
81 
82 /**************************************************************************/
90 {
91  ezradio_change_state(EZRADIO_CMD_CHANGE_STATE_ARG_NEXT_STATE1_NEW_STATE_ENUM_READY);
92 
94 }
95 
96 #endif //#if defined( EZRADIO_PLUGIN_UNMOD_CARRIER )
#define ECODE_EMDRV_EZRADIODRV_TRANSMIT_FAILED
Unable to start transmission.
#define ECODE_EMDRV_EZRADIODRV_OK
Success return value.
EZRADIODRV_UnmodCarrierHandle_t unmodCarrier
Unmodulated carrier plug-in handler.
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.
Ecode_t ezradioStartUnmodulatedCarrier(EZRADIODRV_Handle_t radioHandle)
Starts unmodulated carrier transmission with the radio configurations from the radioHandle parameter...
EzRadio transmit plug-in managed by the plug-in manager if enabled.
Ecode_t ezradioStopUnmodulatedCarrier(void)
Stops unmodulated carrier transmission.
uint32_t Ecode_t
Typedef for API function error code return values.
Definition: ecode.h:51
uint8_t channel
Unmodulated carrier transmit channel.
#define ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE
Illegal SPI handle.
void ezradio_request_device_state(ezradio_cmd_reply_t *ezradioReply)