This file contains TAL helper function declarations.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | AACK_PROM_DISABLE (0x00) |
#define | AACK_PROM_ENABLE (0x01) |
#define | MAX_PDT_LEVEL (0x0f) |
#define | MAX_REG_ADDR_VALUE (0X3fff) |
Typedefs | |
typedef enum param_tag | param_type |
typedef enum tal_trx_status_tag | tal_trx_status_t |
sub-register TRX_STATUS in register TRX_STATUS More... | |
Enumerations | |
enum | param_tag { CC_BAND = 0x04, CC_NUMBER = 0x05, TX_PWR = 0x06, CC_BAND = 0x04, CC_NUMBER = 0x05, TX_PWR = 0x06 } |
enum | tal_trx_status_tag { P_ON = (0), BUSY_RX = (1), BUSY_TX = (2), RX_ON = (6), TRX_OFF = (8), PLL_ON = (9), TRX_SLEEP = (15), BUSY_RX_AACK = (17), BUSY_TX_ARET = (18), RX_AACK_ON = (22), TX_ARET_ON = (25), RX_ON_NOCLK = (28), RX_AACK_ON_NOCLK = (29), BUSY_RX_AACK_NOCLK = (30), STATE_TRANSITION_IN_PROGRESS = (31), P_ON = (0x00), TRX_OFF = (0x08), PLL_ON = (0x09), TRX_SLEEP = (0x0F), RX_ON = (0x16), P_ON = (0x00), BUSY_RX = (0x01), BUSY_TX = (0x02), RX_ON = (0x06), TRX_OFF = (0x08), PLL_ON = (0x09), TRX_SLEEP = (0x0F), BUSY_RX_AACK = (0x11), BUSY_TX_ARET = (0x12), RX_AACK_ON = (0x16), TX_ARET_ON = (0x19), RX_ON_NOCLK = (0x1C), RX_AACK_ON_NOCLK = (0x1D), BUSY_RX_AACK_NOCLK = (0x1E), STATE_TRANSITION_IN_PROGRESS = (0x1F), P_ON = (0x00), BUSY_RX = (0x01), BUSY_TX = (0x02), RX_ON = (0x06), TRX_OFF = (0x08), PLL_ON = (0x09), TRX_SLEEP = (0x0F), BUSY_RX_AACK = (0x11), BUSY_TX_ARET = (0x12), RX_AACK_ON = (0x16), TX_ARET_ON = (0x19), RX_ON_NOCLK = (0x1C), RX_AACK_ON_NOCLK = (0x1D), BUSY_RX_AACK_NOCLK = (0x1E), STATE_TRANSITION_IN_PROGRESS = (0x1F), P_ON = (0x00), BUSY_RX = (0x01), BUSY_TX = (0x02), RX_ON = (0x06), TRX_OFF = (0x08), PLL_ON = (0x09), TRX_SLEEP = (0x0F), PREP_DEEP_SLEEP = (0x10), BUSY_RX_AACK = (0x11), BUSY_TX_ARET = (0x12), RX_AACK_ON = (0x16), TX_ARET_ON = (0x19), STATE_TRANSITION_IN_PROGRESS = (0x1F), TRX_DEEP_SLEEP = (0x20), P_ON = (0x00), BUSY_RX = (0x01), BUSY_TX = (0x02), RX_ON = (0x06), TRX_OFF = (0x08), PLL_ON = (0x09), TRX_SLEEP = (0x0F), BUSY_RX_AACK = (0x11), BUSY_TX_ARET = (0x12), RX_AACK_ON = (0x16), TX_ARET_ON = (0x19), STATE_TRANSITION_IN_PROGRESS = (0x1F) } |
sub-register TRX_STATUS in register TRX_STATUS More... | |
Functions | |
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... | |
retval_t | tal_ant_div_config (bool div_ctrl, uint8_t ant_ctrl) |
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_ext_pa_ctrl (bool pa_ext_sw_ctrl) |
Enable/Disable the external RF front end control. More... | |
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) |
#define AACK_PROM_DISABLE (0x00) |
Referenced by per_mode_receptor_rx_cb(), and set_default_configuration_peer_node().
#define AACK_PROM_ENABLE (0x01) |
Referenced by per_mode_receptor_rx_cb().
#define MAX_PDT_LEVEL (0x0f) |
Referenced by tal_set_rx_sensitivity_level().
#define MAX_REG_ADDR_VALUE (0X3fff) |
Referenced by tal_dump_registers(), tal_trx_reg_read(), and tal_trx_reg_write().
typedef enum param_tag param_type |
typedef enum tal_trx_status_tag tal_trx_status_t |
sub-register TRX_STATUS in register TRX_STATUS
enum param_tag |
enum tal_trx_status_tag |
sub-register TRX_STATUS in register TRX_STATUS
Enumerator | |
---|---|
P_ON |
Constant P_ON for sub-register SR_TRX_STATUS. |
BUSY_RX |
Constant BUSY_RX for sub-register SR_TRX_STATUS. |
BUSY_TX |
Constant BUSY_TX for sub-register SR_TRX_STATUS. |
RX_ON |
Constant RX_ON for sub-register SR_TRX_STATUS. |
TRX_OFF |
Constant TRX_OFF for sub-register SR_TRX_STATUS. |
PLL_ON |
Constant PLL_ON for sub-register SR_TRX_STATUS. |
TRX_SLEEP |
Constant SLEEP for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK |
Constant BUSY_RX_AACK for sub-register SR_TRX_STATUS. |
BUSY_TX_ARET |
Constant BUSY_TX_ARET for sub-register SR_TRX_STATUS. |
RX_AACK_ON |
Constant RX_AACK_ON for sub-register SR_TRX_STATUS. |
TX_ARET_ON |
Constant TX_ARET_ON for sub-register SR_TRX_STATUS. |
RX_ON_NOCLK |
Constant RX_ON_NOCLK for sub-register SR_TRX_STATUS. |
RX_AACK_ON_NOCLK |
Constant RX_AACK_ON_NOCLK for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK_NOCLK |
Constant BUSY_RX_AACK_NOCLK for sub-register SR_TRX_STATUS. |
STATE_TRANSITION_IN_PROGRESS |
Constant STATE_TRANSITION_IN_PROGRESS for sub-register SR_TRX_STATUS. |
P_ON |
Constant P_ON for sub-register SR_TRX_STATUS. |
TRX_OFF |
Constant TRX_OFF for sub-register SR_TRX_STATUS. |
PLL_ON |
Constant PLL_ON for sub-register SR_TRX_STATUS. |
TRX_SLEEP |
Constant TRX_SLEEP for sub-register SR_TRX_STATUS. |
RX_ON |
Constant RX_AACK_ON for sub-register SR_TRX_STATUS. |
P_ON |
Constant P_ON for sub-register SR_TRX_STATUS. |
BUSY_RX |
Constant BUSY_RX for sub-register SR_TRX_STATUS. |
BUSY_TX |
Constant BUSY_TX for sub-register SR_TRX_STATUS. |
RX_ON |
Constant RX_ON for sub-register SR_TRX_STATUS. |
TRX_OFF |
Constant TRX_OFF for sub-register SR_TRX_STATUS. |
PLL_ON |
Constant PLL_ON for sub-register SR_TRX_STATUS. |
TRX_SLEEP |
Constant TRX_SLEEP for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK |
Constant BUSY_RX_AACK for sub-register SR_TRX_STATUS. |
BUSY_TX_ARET |
Constant BUSY_TX_ARET for sub-register SR_TRX_STATUS. |
RX_AACK_ON |
Constant RX_AACK_ON for sub-register SR_TRX_STATUS. |
TX_ARET_ON |
Constant TX_ARET_ON for sub-register SR_TRX_STATUS. |
RX_ON_NOCLK |
Constant RX_ON_NOCLK for sub-register SR_TRX_STATUS. |
RX_AACK_ON_NOCLK |
Constant RX_AACK_ON_NOCLK for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK_NOCLK |
Constant BUSY_RX_AACK_NOCLK for sub-register SR_TRX_STATUS. |
STATE_TRANSITION_IN_PROGRESS |
Constant STATE_TRANSITION_IN_PROGRESS for sub-register SR_TRX_STATUS. |
P_ON |
Constant P_ON for sub-register SR_TRX_STATUS. |
BUSY_RX |
Constant BUSY_RX for sub-register SR_TRX_STATUS. |
BUSY_TX |
Constant BUSY_TX for sub-register SR_TRX_STATUS. |
RX_ON |
Constant RX_ON for sub-register SR_TRX_STATUS. |
TRX_OFF |
Constant TRX_OFF for sub-register SR_TRX_STATUS. |
PLL_ON |
Constant PLL_ON for sub-register SR_TRX_STATUS. |
TRX_SLEEP |
Constant TRX_SLEEP for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK |
Constant BUSY_RX_AACK for sub-register SR_TRX_STATUS. |
BUSY_TX_ARET |
Constant BUSY_TX_ARET for sub-register SR_TRX_STATUS. |
RX_AACK_ON |
Constant RX_AACK_ON for sub-register SR_TRX_STATUS. |
TX_ARET_ON |
Constant TX_ARET_ON for sub-register SR_TRX_STATUS. |
RX_ON_NOCLK |
Constant RX_ON_NOCLK for sub-register SR_TRX_STATUS. |
RX_AACK_ON_NOCLK |
Constant RX_AACK_ON_NOCLK for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK_NOCLK |
Constant BUSY_RX_AACK_NOCLK for sub-register SR_TRX_STATUS. |
STATE_TRANSITION_IN_PROGRESS |
Constant STATE_TRANSITION_IN_PROGRESS for sub-register SR_TRX_STATUS. |
P_ON |
Constant P_ON for sub-register SR_TRX_STATUS. |
BUSY_RX |
Constant BUSY_RX for sub-register SR_TRX_STATUS. |
BUSY_TX |
Constant BUSY_TX for sub-register SR_TRX_STATUS. |
RX_ON |
Constant RX_ON for sub-register SR_TRX_STATUS. |
TRX_OFF |
Constant TRX_OFF for sub-register SR_TRX_STATUS. |
PLL_ON |
Constant PLL_ON for sub-register SR_TRX_STATUS. |
TRX_SLEEP |
Constant TRX_SLEEP for sub-register SR_TRX_STATUS. |
PREP_DEEP_SLEEP |
Constant PREP_DEEP_SLEEP for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK |
Constant BUSY_RX_AACK for sub-register SR_TRX_STATUS. |
BUSY_TX_ARET |
Constant BUSY_TX_ARET for sub-register SR_TRX_STATUS. |
RX_AACK_ON |
Constant RX_AACK_ON for sub-register SR_TRX_STATUS. |
TX_ARET_ON |
Constant TX_ARET_ON for sub-register SR_TRX_STATUS. |
STATE_TRANSITION_IN_PROGRESS |
Constant STATE_TRANSITION_IN_PROGRESS for sub-register SR_TRX_STATUS. |
TRX_DEEP_SLEEP |
Software implemented state. |
P_ON |
Constant P_ON for sub-register SR_TRX_STATUS. |
BUSY_RX |
Constant BUSY_RX for sub-register SR_TRX_STATUS. |
BUSY_TX |
Constant BUSY_TX for sub-register SR_TRX_STATUS. |
RX_ON |
Constant RX_ON for sub-register SR_TRX_STATUS. |
TRX_OFF |
Constant TRX_OFF for sub-register SR_TRX_STATUS. |
PLL_ON |
Constant PLL_ON for sub-register SR_TRX_STATUS. |
TRX_SLEEP |
Constant TRX_SLEEP for sub-register SR_TRX_STATUS. |
BUSY_RX_AACK |
Constant BUSY_RX_AACK for sub-register SR_TRX_STATUS. |
BUSY_TX_ARET |
Constant BUSY_TX_ARET for sub-register SR_TRX_STATUS. |
RX_AACK_ON |
Constant RX_AACK_ON for sub-register SR_TRX_STATUS. |
TX_ARET_ON |
Constant TX_ARET_ON for sub-register SR_TRX_STATUS. |
STATE_TRANSITION_IN_PROGRESS |
Constant STATE_TRANSITION_IN_PROGRESS for sub-register SR_TRX_STATUS. |
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().
retval_t tal_convert_reg_value_to_dBm | ( | uint8_t | reg_value, |
int8_t * | dbm_value | ||
) |
References MAC_SUCCESS.
Referenced by set_parameter_on_transmitter_node(), set_paramter_on_recptor_node(), set_tx_power(), and tal_set_tx_pwr().
retval_t tal_dump_registers | ( | trx_id_t | trx, |
uint16_t | start_addr, | ||
uint16_t | end_addr, | ||
uint8_t * | value | ||
) |
References length, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_REG_ADDR_VALUE, and trx_reg_read().
Referenced by dump_trx_register_values().
Enable/Disable the external RF front end control.
pa_ext_sw_ctrl | true if external rf front end control has to be enabled |
Referenced by peer_search_initiator_init(), peer_search_receptor_init(), and per_mode_initiator_init().
retval_t tal_get_curr_trx_config | ( | trx_id_t | trx, |
param_type | parameter, | ||
uint8_t * | param_value | ||
) |
References MAC_INVALID_PARAMETER, MAC_SUCCESS, RF_BASE_ADDR_OFFSET, SR_BBC0_AFC0_PM, SR_RF09_PAC_TXPWR, trx_bit_read(), and TX_PWR.
Referenced by config_per_test_parameters(), perf_get_req(), set_parameter_on_transmitter_node(), set_paramter_on_recptor_node(), and set_tx_power().
tal_trx_status_t tal_get_trx_status | ( | trx_id_t | trx | ) |
References P_ON, PLL_ON, RF_BASE_ADDR_OFFSET, RX_ON, SR_RF09_STATE_STATE, STATUS_RF_RESET, STATUS_RF_RX, STATUS_RF_TRXOFF, STATUS_RF_TXPREP, TAL_SLEEP, tal_state, trx_bit_read(), TRX_OFF, and TRX_SLEEP.
Referenced by config_rpc_mode(), perf_get_req(), and set_transceiver_state().
References FAILURE, MAC_SUCCESS, RF_BASE_ADDR_OFFSET, SR_BBC0_AFC0_PM, SR_BBC0_PC_FCSFE, temp, trx_bit_read(), and trx_bit_write().
Referenced by per_mode_receptor_rx_cb(), and set_default_configuration_peer_node().
References FAILURE, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_PDT_LEVEL, SR_BBC1_OQPSKC1_PDT0, temp, trx_bit_read(), and trx_bit_write().
Referenced by config_per_test_parameters(), config_rx_desensitization(), and recover_all_settings().
Enable/Disable the external RF front end control.
pa_ext_sw_ctrl | true if external rf front end control has to be enabled |
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().
References MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_REG_ADDR_VALUE, and trx_reg_read().
Referenced by read_trx_registers(), and set_paramter_on_recptor_node().
References MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_REG_ADDR_VALUE, trx_reg_read(), and trx_reg_write().
Referenced by config_per_test_parameters(), config_rpc_mode(), set_paramter_on_recptor_node(), and write_trx_registers().