ezradio_api_lib.h File Reference

This file contains the common API library of the EZRadio and EZRadioPRO families. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EZRADIO_FIFO_SIZE   64

Enumerations

enum  EZRADIO_ConfigRet_t {
  EZRADIO_CONFIG_SUCCESS,
  EZRADIO_CONFIG_NO_PATCH,
  EZRADIO_CONFIG_CTS_TIMEOUT,
  EZRADIO_CONFIG_PATCH_FAIL,
  EZRADIO_CONFIG_COMMAND_ERROR
}
 

EZRadio device configuration return values.

More...

Functions

void ezradio_reset (void)
void ezradio_power_up (uint8_t boot_options, uint8_t xtal_options, uint32_t xo_freq)
void ezradio_part_info (void)
void ezradio_start_tx (uint8_t channel, uint8_t condition, uint16_t tx_len)
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)
void ezradio_get_int_status (uint8_t ph_clr_pend, uint8_t modem_clr_pend, uint8_t chip_clr_pend)
void ezradio_gpio_pin_cfg (uint8_t gpio0, uint8_t gpio1, uint8_t gpio2, uint8_t gpio3, uint8_t nirq, uint8_t sdo, uint8_t gen_config)
void ezradio_set_property (uint8_t group, uint8_t num_props, uint8_t start_prop,...)
void ezradio_change_state (uint8_t next_state1)

Variables

union ezradio_cmd_reply_union ezradioReply
uint8_t ezradioCmd [16u]

Detailed Description

This file contains the common API library of the EZRadio and EZRadioPRO families.

Note:
The ezradiodrv API is not settled entirely in the current relase.
Version:
4.0.0

License

(C) Copyright 2015 Silicon Labs, http://www.silabs.com

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.

Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.

Definition in file ezradio_api_lib.h.


Enumeration Type Documentation

EZRadio device configuration return values.

Enumerator:
EZRADIO_CONFIG_SUCCESS 

Configuration succeded.

EZRADIO_CONFIG_NO_PATCH 

No patch is given.

EZRADIO_CONFIG_CTS_TIMEOUT 

CTS timeout error during configuration.

EZRADIO_CONFIG_PATCH_FAIL 

Patching is failed.

EZRADIO_CONFIG_COMMAND_ERROR 

Command error during configuration.

Definition at line 54 of file ezradio_api_lib.h.


Function Documentation

void ezradio_change_state ( uint8_t  next_state1  ) 

Issue a change state command to the radio.

Parameters:
next_state1 Next state.

Definition at line 266 of file ezradio_api_lib.c.

References ezradio_comm_SendCmd().

Here is the call graph for this function:

void ezradio_get_int_status ( uint8_t  ph_clr_pend,
uint8_t  modem_clr_pend,
uint8_t  chip_clr_pend 
)

Get the Interrupt status/pending flags form the radio and clear flags if requested.

Parameters:
ph_clr_pend Packet Handler pending flags clear.
modem_clr_pend Modem Status pending flags clear.
chip_clr_pend Chip State pending flags clear.

Definition at line 169 of file ezradio_api_lib.c.

References ezradio_comm_SendCmdGetResp().

Here is the call graph for this function:

void ezradio_gpio_pin_cfg ( uint8_t  gpio0,
uint8_t  gpio1,
uint8_t  gpio2,
uint8_t  gpio3,
uint8_t  nirq,
uint8_t  sdo,
uint8_t  gen_config 
)

Send GPIO pin config command to the radio and reads the answer into union.

Parameters:
gpio0 GPIO0 configuration.
gpio1 GPIO1 configuration.
gpio2 GPIO2 configuration.
gpio3 GPIO3 configuration.
nirq NIRQ configuration.
sdo SDO configuration.
gen_config General pin configuration.

Definition at line 203 of file ezradio_api_lib.c.

References ezradio_comm_SendCmdGetResp().

Here is the call graph for this function:

void ezradio_part_info ( void   ) 

This function sends the PART_INFO command to the radio and receives the answer into union.

Definition at line 97 of file ezradio_api_lib.c.

References ezradio_comm_SendCmdGetResp().

Here is the call graph for this function:

void ezradio_power_up ( uint8_t  boot_options,
uint8_t  xtal_options,
uint32_t  xo_freq 
)

This function is used to initialize after power-up the radio chip. Before this function should be called.

Definition at line 81 of file ezradio_api_lib.c.

References ezradio_comm_SendCmd().

Here is the call graph for this function:

void ezradio_reset ( void   ) 

This functions is used to reset the EZRadio device by applying shutdown and releasing it. After this function ezradio_power_up or ezradio_configuration_init should be called. The user can check if POR has completed by waiting 4 ms or by polling radio GPIO 0, 2, or 3. When these GPIOs are high, it is safe to call the above mentioned functions.

Definition at line 59 of file ezradio_api_lib.c.

References ezradio_comm_ClearCTS(), ezradio_hal_AssertShutdown(), ezradio_hal_DeassertShutdown(), USTIMER_DeInit(), USTIMER_Delay(), and USTIMER_Init().

Here is the call graph for this function:

void ezradio_set_property ( uint8_t  group,
uint8_t  num_props,
uint8_t  start_prop,
  ... 
)

Send SET_PROPERTY command to the radio.

Parameters:
group Property group.
num_props Number of property to be set. The properties must be in ascending order in their sub-property aspect. Max. 12 properties can be set in one command.
start_prop Start sub-property address.

Definition at line 239 of file ezradio_api_lib.c.

References ezradio_comm_SendCmd().

Here is the call graph for this function:

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 
)

Sends START_RX command to the radio.

Parameters:
channel Channel number.
condition Start RX condition.
rx_len Payload length (exclude the PH generated CRC).
next_state1 Next state when Preamble Timeout occurs.
next_state2 Next state when a valid packet received.
next_state3 Next state when invalid packet received (e.g. CRC error).

Definition at line 148 of file ezradio_api_lib.c.

References ezradio_comm_SendCmd().

Here is the call graph for this function:

void ezradio_start_tx ( uint8_t  channel,
uint8_t  condition,
uint16_t  tx_len 
)

Sends START_TX command to the radio.

Parameters:
channel Channel number.
condition Start TX condition.
tx_len Payload length (exclude the PH generated CRC).

Definition at line 122 of file ezradio_api_lib.c.

References ezradio_comm_SendCmd().

Here is the call graph for this function: