42 #include "ezradio_cmd.h"
43 #include "ezradio_prop.h"
46 #include "ezradio_api_lib_add.h"
52 static const uint8_t Radio_Configuration_Data_Array[] = \
53 RADIO_CONFIGURATION_DATA_ARRAY;
56 static bool ezradioIrqReceived =
false;
58 #if defined( EZRADIO_PLUGIN_TRANSMIT )
62 #if defined( EZRADIO_PLUGIN_RECEIVE )
66 #if defined( EZRADIO_PLUGIN_CRC_ERROR )
70 static void ezradioPowerUp(
void);
72 static void GPIO_EZRadio_INT_IRQHandler( uint8_t pin );
86 #if defined( EZRADIO_PLUGIN_PTI )
103 printf(
"ERROR: Radio configuration failed!\n");
131 ezradio_cmd_reply_t radioReplyData;
134 if ( radioHandle == NULL )
140 if (ezradioIrqReceived)
143 ezradioIrqReceived =
false;
148 #if defined( EZRADIO_PLUGIN_TRANSMIT )
149 ezradioHandleTransmitPlugin( radioHandle, radioReplyHandle );
152 #if defined( EZRADIO_PLUGIN_RECEIVE )
153 ezradioHandleReceivePlugin( radioHandle, radioReplyHandle );
156 #if defined( EZRADIO_PLUGIN_CRC_ERROR )
157 ezradioHandleCrcErrorPlugin( radioHandle, radioReplyHandle );
170 #if defined( EZRADIO_PLUGIN_RECEIVE )
172 #endif //#if defined( EZRADIO_PLUGIN_RECEIVE )
174 #if defined( EZRADIO_PLUGIN_TRANSMIT )
176 #endif //#if defined( EZRADIO_PLUGIN_TRANSMIT )
184 static void ezradioPowerUp(
void)
192 USTIMER_Delay( RADIO_CONFIG_DATA_RADIO_DELAY_AFTER_RESET_US );
200 static void GPIO_EZRadio_INT_IRQHandler( uint8_t pin )
205 ezradioIrqReceived =
true;
void ezradioResetTRxFifo(void)
Resets both the TX and RX FIFOs.
void ezradioInit(EZRADIODRV_Handle_t handle)
Radio Initialization.
#define ECODE_EMDRV_EZRADIODRV_OK
Success return value.
void ezradio_hal_SpiInit(void)
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.
void ezradio_hal_GpioInit(GPIOINT_IrqCallbackPtr_t ezradioIrqCallback, bool enablePTI)
Ecode_t USTIMER_Init(void)
Activate and initialize the hardware timer used to pace the 1 microsecond delay functions.
This file contains EZRadio HAL.
void ezradio_fifo_info(uint8_t fifo, ezradio_cmd_reply_t *ezradioReply)
General Purpose IO (GPIO) peripheral API.
uint32_t Ecode_t
Typedef for API function error code return values.
EZRADIO_ConfigRet_t ezradio_configuration_init(const uint8_t *pSetPropCmd)
Ecode_t USTIMER_DeInit(void)
Deinitialize USTIMER driver.
#define ECODE_EMDRV_EZRADIODRV_ILLEGAL_HANDLE
Illegal SPI handle.
Microsecond delay function API definition.
ezradio_cmd_reply_t * EZRADIODRV_ReplyHandle_t
EZradio reply union handle.
Ecode_t USTIMER_Delay(uint32_t usec)
Delay a given number of microseconds.
Ecode_t ezradioPluginManager(EZRADIODRV_Handle_t radioHandle)
EzRadio plugin manager state machine handler. This function should be called in the application in an...