Microchip® Advanced Software Framework

tal_helper_2.c File Reference

This file implements helper functions to configure transceiver.

Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.

#include "pal.h"
#include "return_val.h"
#include "tal.h"
#include "tal_internal.h"
#include "ieee_const.h"
#include "tal_helper_2.h"

Functions

uint8_t convert_phyTransmitPower_to_reg_value (uint8_t phyTransmitPower_value)
 Converts a phyTransmitPower value to a register value. More...
 
bool crc_check_ok (trx_id_t trx)
 Calculates CRC manually and compares with the received and returns true if both are same,false otherwise. More...
 
 FLASH_EXTERN (int8_t tx_pwr_table[16])
 
retval_t tal_convert_reg_value_to_dBm (uint8_t reg_value, int8_t *dbm_value)
 
retval_t tal_dump_registers (trx_id_t trx, uint16_t start_addr, uint16_t end_addr, uint8_t *value)
 
retval_t tal_get_curr_trx_config (trx_id_t trx, param_type parameter, uint8_t *param_value)
 
tal_trx_status_t tal_get_trx_status (trx_id_t trx)
 
retval_t tal_rxaack_prom_mode_ctrl (trx_id_t trx, bool prom_ctrl)
 
retval_t tal_set_rx_sensitivity_level (trx_id_t trx, uint8_t pdt_level)
 
retval_t tal_set_tx_pwr (trx_id_t trx, bool type, int8_t pwr_value)
 Enable/Disable the external RF front end control. More...
 
retval_t tal_trx_reg_read (trx_id_t trx, uint16_t reg_addr, uint8_t *data)
 
retval_t tal_trx_reg_write (trx_id_t trx, uint16_t reg_addr, uint8_t value)
 

bool crc_check_ok ( trx_id_t  trx)

Calculates CRC manually and compares with the received and returns true if both are same,false otherwise.

References RF_BASE_ADDR_OFFSET, SR_BBC0_PC_FCSOK, and trx_bit_read().

Referenced by per_mode_receptor_rx_cb().

FLASH_EXTERN ( int8_t  tx_pwr_table[16])
retval_t tal_convert_reg_value_to_dBm ( uint8_t  reg_value,
int8_t *  dbm_value 
)
retval_t tal_dump_registers ( trx_id_t  trx,
uint16_t  start_addr,
uint16_t  end_addr,
uint8_t *  value 
)
retval_t tal_set_tx_pwr ( trx_id_t  trx,
bool  type,
int8_t  pwr_value 
)

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 CONV_DBM_TO_phyTransmitPower, convert_phyTransmitPower_to_reg_value(), FAILURE, MAC_INVALID_PARAMETER, MAC_SUCCESS, phyTransmitPower, tal_convert_reg_value_to_dBm(), tal_pib, tal_pib_set(), and temp.

Referenced by peer_search_initiator_init(), peer_search_receptor_init(), set_paramter_on_recptor_node(), and set_tx_power().

retval_t tal_trx_reg_read ( trx_id_t  trx,
uint16_t  reg_addr,
uint8_t *  data 
)