This file contains TAL helper function declarations.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | AACK_PROM_DISABLE (0x00) |
#define | AACK_PROM_ENABLE (0x01) |
#define | ANT_AUTO_SEL (0) |
#define | ANT_CTRL_0 (0) |
Support and FAQ: visit Atmel Support More... | |
#define | ANT_CTRL_1 (1) |
#define | ANT_CTRL_2 (2) |
#define | ANT_CTRL_3 (3) |
#define | ANT_DIVERSITY_DISABLE (0) |
#define | ANT_DIVERSITY_ENABLE (1) |
#define | ANT_EXTERNAL_SW_DISABLE (0) |
#define | ANT_EXTERNAL_SW_ENABLE (1) |
#define | BASE_ISM_FREQUENCY_MHZ (2306) |
#define | CC_1_END_FREQUENCY (794.5) |
#define | CC_1_START_FREQUENCY (769.0) |
#define | CC_2_END_FREQUENCY (882.5) |
#define | CC_2_START_FREQUENCY (857.0) |
#define | CC_3_END_FREQUENCY (928.5) |
#define | CC_3_START_FREQUENCY (903.0) |
#define | CC_4_END_FREQUENCY (863.0) |
#define | CC_4_START_FREQUENCY (769.0) |
#define | CC_5_END_FREQUENCY (935.0) |
#define | CC_5_START_FREQUENCY (833.0) |
#define | CC_6_END_FREQUENCY (927.5) |
#define | CC_6_START_FREQUENCY (902.0) |
#define | CC_BAND_0 (0x00) |
#define | CC_BAND_0 (0x00) |
#define | CC_BAND_1 (0x01) |
#define | CC_BAND_2 (0x02) |
#define | CC_BAND_3 (0x03) |
#define | CC_BAND_4 (0x04) |
#define | CC_BAND_5 (0x05) |
#define | CC_BAND_6 (0x06) |
#define | CC_BAND_8 (0x08) |
#define | CC_BAND_9 (0x09) |
#define | CC_NUMBER_0 (0x00) |
#define | DBM_VALUE (0x00) |
#define | DEFAULT_TX_POWER_CH26 (0x80 | 0x0d) |
#define | MAX_CC_BAND (0x05) |
#define | MAX_ISM_FREQUENCY_MHZ (2527) |
#define | MAX_PDT_LEVEL (0x0f) |
#define | MAX_REG_ADDR_VALUE (0x1ff) |
#define | MID_ISM_FREQUENCY_MHZ (2434) |
#define | MIN_CC_BAND_4_OFFSET (0x5E) |
#define | MIN_CC_BAND_5_OFFSET (0x66) |
#define | MIN_CC_BAND_8_OFFSET (0x20) |
#define | MIN_CC_BAND_9_OFFSET (0xBA) |
#define | MIN_ISM_FREQUENCY_MHZ (2322) |
#define | REGISTER_VALUE (0x01) |
#define | RSSI_BASE_VAL_EXT (RSSI_BASE_VAL_DBM - EXT_LNA_HIGH_GAIN) |
RSSI BASE VAL based on External LNA Gain. More... | |
Typedefs | |
typedef enum param_tag | param_type |
Enumerations | |
enum | param_tag { CC_BAND = 0x04, CC_NUMBER = 0x05, TX_PWR = 0x06 } |
Functions | |
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_rxsafe_mode_ctrl (bool safe_mode_ctrl) |
Enable/Disable the rx safe mode. More... | |
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) |
#define AACK_PROM_DISABLE (0x00) |
#define AACK_PROM_ENABLE (0x01) |
#define ANT_AUTO_SEL (0) |
#define ANT_CTRL_0 (0) |
Support and FAQ: visit Atmel Support
#define ANT_CTRL_1 (1) |
#define ANT_CTRL_2 (2) |
#define ANT_CTRL_3 (3) |
#define ANT_DIVERSITY_DISABLE (0) |
#define ANT_DIVERSITY_ENABLE (1) |
#define ANT_EXTERNAL_SW_DISABLE (0) |
#define ANT_EXTERNAL_SW_ENABLE (1) |
#define BASE_ISM_FREQUENCY_MHZ (2306) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define CC_1_END_FREQUENCY (794.5) |
Referenced by tal_set_frequency().
#define CC_1_START_FREQUENCY (769.0) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define CC_2_END_FREQUENCY (882.5) |
Referenced by tal_set_frequency().
#define CC_2_START_FREQUENCY (857.0) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define CC_3_END_FREQUENCY (928.5) |
Referenced by tal_set_frequency().
#define CC_3_START_FREQUENCY (903.0) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define CC_4_END_FREQUENCY (863.0) |
Referenced by tal_set_frequency().
#define CC_4_START_FREQUENCY (769.0) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define CC_5_END_FREQUENCY (935.0) |
Referenced by tal_set_frequency().
#define CC_5_START_FREQUENCY (833.0) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define CC_6_END_FREQUENCY (927.5) |
Referenced by tal_set_frequency().
#define CC_6_START_FREQUENCY (902.0) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define CC_BAND_0 (0x00) |
#define CC_BAND_0 (0x00) |
#define CC_BAND_1 (0x01) |
Referenced by tal_set_frequency().
#define CC_BAND_2 (0x02) |
Referenced by tal_set_frequency().
#define CC_BAND_3 (0x03) |
Referenced by tal_set_frequency().
#define CC_BAND_4 (0x04) |
Referenced by tal_set_frequency(), and tal_set_frequency_regs().
#define CC_BAND_5 (0x05) |
Referenced by tal_set_frequency(), and tal_set_frequency_regs().
#define CC_BAND_6 (0x06) |
Referenced by tal_set_frequency().
#define CC_BAND_8 (0x08) |
Referenced by tal_calculate_frequency(), tal_set_frequency(), and tal_set_frequency_regs().
#define CC_BAND_9 (0x09) |
Referenced by tal_calculate_frequency(), tal_set_frequency(), and tal_set_frequency_regs().
#define CC_NUMBER_0 (0x00) |
#define DBM_VALUE (0x00) |
#define DEFAULT_TX_POWER_CH26 (0x80 | 0x0d) |
#define MAX_CC_BAND (0x05) |
Referenced by tal_calculate_frequency(), and tal_set_frequency_regs().
#define MAX_ISM_FREQUENCY_MHZ (2527) |
Referenced by tal_set_frequency().
#define MAX_PDT_LEVEL (0x0f) |
Referenced by tal_set_rx_sensitivity_level().
#define MAX_REG_ADDR_VALUE (0x1ff) |
Referenced by tal_dump_registers(), tal_trx_reg_read(), and tal_trx_reg_write().
#define MID_ISM_FREQUENCY_MHZ (2434) |
Referenced by tal_calculate_frequency(), and tal_set_frequency().
#define MIN_CC_BAND_4_OFFSET (0x5E) |
Referenced by tal_calculate_frequency(), and tal_set_frequency_regs().
#define MIN_CC_BAND_5_OFFSET (0x66) |
Referenced by tal_calculate_frequency(), and tal_set_frequency_regs().
#define MIN_CC_BAND_8_OFFSET (0x20) |
Referenced by tal_calculate_frequency(), and tal_set_frequency_regs().
#define MIN_CC_BAND_9_OFFSET (0xBA) |
Referenced by tal_calculate_frequency(), and tal_set_frequency_regs().
#define MIN_ISM_FREQUENCY_MHZ (2322) |
Referenced by tal_set_frequency().
#define REGISTER_VALUE (0x01) |
#define RSSI_BASE_VAL_EXT (RSSI_BASE_VAL_DBM - EXT_LNA_HIGH_GAIN) |
RSSI BASE VAL based on External LNA Gain.
typedef enum param_tag param_type |
enum param_tag |
retval_t tal_calculate_frequency | ( | uint8_t | cc_band, |
uint8_t | cc_number, | ||
float * | freq | ||
) |
References BASE_ISM_FREQUENCY_MHZ, CC_1_START_FREQUENCY, CC_2_START_FREQUENCY, CC_3_START_FREQUENCY, CC_4_START_FREQUENCY, CC_5_START_FREQUENCY, CC_6_START_FREQUENCY, CC_BAND_8, CC_BAND_9, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_CC_BAND, MID_ISM_FREQUENCY_MHZ, MIN_CC_BAND_4_OFFSET, MIN_CC_BAND_5_OFFSET, MIN_CC_BAND_8_OFFSET, and MIN_CC_BAND_9_OFFSET.
retval_t tal_dump_registers | ( | uint16_t | start_addr, |
uint16_t | end_addr, | ||
uint8_t * | value | ||
) |
References MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_REG_ADDR_VALUE, and trx_reg_read().
retval_t tal_get_curr_trx_config | ( | param_type | parameter, |
uint8_t * | param_value | ||
) |
References CC_BAND, CC_NUMBER, MAC_INVALID_PARAMETER, MAC_SUCCESS, RG_CC_CTRL_0, SR_AACK_PROM_MODE, SR_ANT_CTRL, SR_ANT_DIV_EN, SR_ANT_SEL, SR_CC_BAND, SR_TX_PWR, trx_bit_read(), trx_reg_read(), and TX_PWR.
int8_t tal_get_rssi_base_val | ( | void | ) |
References RSSI_BASE_VAL_DBM, and tal_pib.
tal_trx_status_t tal_get_trx_status | ( | void | ) |
References SR_TRX_STATUS, and trx_bit_read().
retval_t tal_rpc_mode_config | ( | uint8_t | rpc_mode_sel | ) |
References FAILURE, MAC_SUCCESS, RG_TRX_RPC, trx_reg_read(), and trx_reg_write().
Enable/Disable the rx safe mode.
safe_mode_ctrl | true if rx safe mode has to be enabled |
References FAILURE, MAC_SUCCESS, SR_RX_SAFE_MODE, trx_bit_read(), and trx_bit_write().
retval_t tal_set_frequency | ( | float | frequency | ) |
Enable/Disable the external RF front end control.
pa_ext_sw_ctrl | true if external rf front end control has to be enabled |
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
cc_band | band to be selected in cc_band register bits |
cc_number | offset frequency to be selected in cc_number register bits |
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().
retval_t tal_trx_reg_read | ( | uint16_t | reg_addr, |
uint8_t * | data | ||
) |
References MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_REG_ADDR_VALUE, and trx_reg_read().
retval_t tal_trx_reg_write | ( | uint16_t | reg_addr, |
uint8_t | value | ||
) |
References MAC_INVALID_PARAMETER, MAC_SUCCESS, MAX_REG_ADDR_VALUE, trx_reg_read(), and trx_reg_write().