Microchip® Advanced Software Framework

tal_helper.c File Reference
#include "pal.h"
#include "return_val.h"
#include "tal.h"
#include "tal_internal.h"
#include "ieee_const.h"
#include "tal_helper.h"

Functions

uint8_t convert_phyTransmitPower_to_reg_value (uint8_t phyTransmitPower_value)
 Support and FAQ: visit Atmel Support More...
 
retval_t tal_calculate_frequency (uint8_t cc_band, uint8_t cc_number, float *freq)
 
retval_t tal_dump_registers (uint16_t start_addr, uint16_t end_addr, uint8_t *value)
 
retval_t tal_get_curr_trx_config (param_type parameter, uint8_t *param_value)
 
int8_t tal_get_rssi_base_val (void)
 
tal_trx_status_t tal_get_trx_status (void)
 
retval_t tal_rpc_mode_config (uint8_t rpc_mode_sel)
 
retval_t tal_set_frequency (float frequency)
 Enable/Disable the external RF front end control. More...
 
retval_t tal_set_frequency_regs (uint8_t cc_band, uint8_t cc_number)
 to set the frequency based on CC_BAND and CC_NUMBER Registers More...
 
retval_t tal_trx_reg_read (uint16_t reg_addr, uint8_t *data)
 
retval_t tal_trx_reg_write (uint16_t reg_addr, uint8_t value)
 

retval_t tal_dump_registers ( uint16_t  start_addr,
uint16_t  end_addr,
uint8_t *  value 
)
tal_trx_status_t tal_get_trx_status ( void  )
retval_t tal_rpc_mode_config ( uint8_t  rpc_mode_sel)
retval_t tal_set_frequency ( float  frequency)

Enable/Disable the external RF front end control.

Parameters
pa_ext_sw_ctrltrue if external rf front end control has to be enabled
Returns
MAC_SUCCESS if PA_EXT_EN bit is configured correctly FAILURE otherwise Enable/Disable the external RF front end control
Parameters
pa_ext_sw_ctrltrue if external rf front end control has to be enabled
Returns
MAC_SUCCESS if PA_EXT_EN bit is configured correctly FAILURE otherwise

References BASE_ISM_FREQUENCY_MHZ, CC_1_END_FREQUENCY, CC_1_START_FREQUENCY, CC_2_END_FREQUENCY, CC_2_START_FREQUENCY, CC_3_END_FREQUENCY, CC_3_START_FREQUENCY, CC_4_END_FREQUENCY, CC_4_START_FREQUENCY, CC_5_END_FREQUENCY, CC_5_START_FREQUENCY, CC_6_END_FREQUENCY, CC_6_START_FREQUENCY, CC_BAND_1, CC_BAND_2, CC_BAND_3, CC_BAND_4, CC_BAND_5, CC_BAND_6, CC_BAND_8, CC_BAND_9, CMD_RX_AACK_ON, CMD_TRX_OFF, FAILURE, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_ISM_FREQUENCY_MHZ, MID_ISM_FREQUENCY_MHZ, MIN_ISM_FREQUENCY_MHZ, RG_CC_CTRL_0, RX_AACK_ON, set_trx_state(), SR_CC_BAND, tal_trx_status, trx_bit_read(), trx_bit_write(), TRX_OFF, trx_reg_read(), and trx_reg_write().

retval_t tal_set_frequency_regs ( uint8_t  cc_band,
uint8_t  cc_number 
)

to set the frequency based on CC_BAND and CC_NUMBER Registers

Parameters
cc_bandband to be selected in cc_band register bits
cc_numberoffset frequency to be selected in cc_number register bits
Returns
MAC_SUCCESS if frequency is configured correctly MAC_INVALID_PARAMETER if out of range or incorrect values are given FAILURE if frequency registers are not configured properly

References CC_BAND_4, CC_BAND_5, CC_BAND_8, CC_BAND_9, CMD_RX_AACK_ON, CMD_TRX_OFF, FAILURE, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_CC_BAND, MIN_CC_BAND_4_OFFSET, MIN_CC_BAND_5_OFFSET, MIN_CC_BAND_8_OFFSET, MIN_CC_BAND_9_OFFSET, RG_CC_CTRL_0, RX_AACK_ON, set_trx_state(), SR_CC_BAND, tal_trx_status, trx_bit_read(), trx_bit_write(), TRX_OFF, trx_reg_read(), and trx_reg_write().

Referenced by set_channel(), set_parameter_on_transmitter_node(), and set_paramter_on_recptor_node().

retval_t tal_trx_reg_read ( uint16_t  reg_addr,
uint8_t *  data 
)