The PIB(Pan Information Base) attributes related to the TAL are Stored and handled by the TAL PIB storage.
Macros | |
#define | GET_CHINA_FREQ(x) (11 + (2 * x)) |
Functions | |
static bool | apply_channel_page_configuration (uint8_t ch_page) |
Apply channel page configuartion to transceiver. More... | |
uint8_t | convert_phyTransmitPower_to_reg_value (uint8_t phyTransmitPower_value) |
Converts a phyTransmitPower value to a register value. More... | |
static | FLASH_DECLARE (uint8_t tx_pwr_table_NA[TX_PWR_TABLE_SIZE]) = { TX_PWR_TABLE_CHINA } |
Tx power table in flash. More... | |
void | init_tal_pib (void) |
Initialize the TAL PIB. More... | |
static void | limit_tx_pwr (void) |
Limit the phyTransmitPower to the trx limits. More... | |
retval_t | tal_pib_get (uint8_t attribute, uint8_t *value) |
Gets a TAL PIB attribute. More... | |
retval_t | tal_pib_set (uint8_t attribute, pib_value_t *value) |
Sets a TAL PIB attribute. More... | |
void | write_all_tal_pib_to_trx (void) |
Write all shadow PIB variables to the transceiver. More... | |
#define GET_CHINA_FREQ | ( | x | ) | (11 + (2 * x)) |
Referenced by apply_channel_page_configuration(), and tal_pib_set().
|
static |
Apply channel page configuartion to transceiver.
ch_page | Channel page |
References ACK_TIME_12_SYMBOLS, ACK_TIME_2_SYMBOLS, ALTRATE_100_KBPS_OR_250_KBPS, ALTRATE_200_KBPS_OR_500_KBPS, ALTRATE_400_KBPS_OR_1_MBPS, BPSK_MODE, BPSK_TX_OFFSET, GET_CHINA_FREQ, HALF_SINE_FILTERING, HIGH_DATA_RATE, LOW_DATA_RATE, MAX_FRAME_DURATION, NO_OF_SYMBOLS_PREAMBLE_SFD, OQPSK_MODE, OQPSK_TX_OFFSET, RC_0_8_FILTERING, SR_AACK_ACK_TIME, SR_BPSK_OQPSK, SR_CC_BAND, SR_CC_NUMBER, SR_CHANNEL, SR_GC_TX_OFFS, SR_OQPSK_DATA_RATE, SR_OQPSK_SUB1_RC_EN, SR_SUB_MODE, SYMBOLS_PER_OCTET, tal_pib, TRX_SUPPORTED_CHANNELS, and TRX_SUPPORTED_CHANNELS_CHINA.
Referenced by tal_pib_set(), and write_all_tal_pib_to_trx().
uint8_t convert_phyTransmitPower_to_reg_value | ( | uint8_t | phyTransmitPower_value | ) |
Converts a phyTransmitPower value to a register value.
Support and FAQ: visit Atmel Support
phyTransmitPower_value | phyTransmitPower value |
References CONV_phyTransmitPower_TO_DBM, i, and PGM_READ_BYTE.
|
static |
Tx power table in flash.
void init_tal_pib | ( | void | ) |
Initialize the TAL PIB.
This function initializes the TAL information base attributes to their default values.
References limit_tx_pwr(), TAL_BATTERY_LIFE_EXTENSION_DEFAULT, TAL_BEACON_ORDER_DEFAULT, TAL_CCA_MODE_DEFAULT, TAL_CURRENT_CHANNEL_DEFAULT, TAL_CURRENT_PAGE_DEFAULT, TAL_MAX_CSMA_BACKOFFS_DEFAULT, TAL_MAX_FRAME_DURATION_DEFAULT, TAL_MAXBE_DEFAULT, TAL_MAXFRAMERETRIES_DEFAULT, TAL_MINBE_DEFAULT, TAL_PAN_COORDINATOR_DEFAULT, TAL_PANID_BC_DEFAULT, tal_pib, TAL_PIB_PROMISCUOUS_MODE_DEFAULT, TAL_SHORT_ADDRESS_DEFAULT, TAL_SHR_DURATION_DEFAULT, TAL_SUPERFRAME_ORDER_DEFAULT, TAL_SYMBOLS_PER_OCTET_DEFAULT, TAL_TRANSMIT_POWER_DEFAULT, and TRX_SUPPORTED_CHANNELS.
|
static |
Limit the phyTransmitPower to the trx limits.
phyTransmitPower | phyTransmitPower value |
References CONV_DBM_TO_phyTransmitPower, CONV_phyTransmitPower_TO_DBM, MAX_TX_PWR, MAX_TX_PWR_BPSK_20, MAX_TX_PWR_CHINA, MAX_TX_PWR_CHINA_1000, MAX_TX_PWR_OQPSK_100, MIN_TX_PWR, tal_pib, and TX_PWR_TOLERANCE.
Referenced by init_tal_pib(), and tal_pib_set().
retval_t tal_pib_get | ( | uint8_t | attribute, |
uint8_t * | value | ||
) |
Gets a TAL PIB attribute.
This function is called to retrieve the transceiver information base attributes.
[in] | attribute | TAL infobase attribute ID |
[out] | value | TAL infobase attribute value |
References mac_i_pan_coordinator, MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, macAckWaitDuration, macBattLifeExt, macBeaconOrder, macBeaconTxTime, macIeeeAddress, macMaxBE, macMaxCSMABackoffs, macMaxFrameRetries, macMinBE, macPANId, macPromiscuousMode, macShortAddress, macSuperframeOrder, phyCCAMode, phyChannelsSupported, phyCurrentChannel, phyCurrentPage, phyMaxFrameDuration, phySHRDuration, phySymbolsPerOctet, phyTransmitPower, and tal_pib.
retval_t tal_pib_set | ( | uint8_t | attribute, |
pib_value_t * | value | ||
) |
Sets a TAL PIB attribute.
This function is called to set the transceiver information base attributes.
attribute | TAL infobase attribute ID |
value | TAL infobase attribute value to be set |
References apply_channel_page_configuration(), Assert, CMD_PLL_ON, CMD_RX_AACK_ON, CMD_RX_ON, CMD_TRX_OFF, convert_phyTransmitPower_to_reg_value(), GET_CHINA_FREQ, i, limit_tx_pwr(), mac_i_pan_coordinator, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, macAckWaitDuration, macBattLifeExt, macBeaconOrder, macBeaconTxTime, macIeeeAddress, macMaxBE, macMaxCSMABackoffs, macMaxFrameRetries, macMinBE, macPANId, macPromiscuousMode, macShortAddress, macSuperframeOrder, NULL, phyCCAMode, phyCurrentChannel, phyCurrentPage, phyTransmitPower, ptr, RG_IEEE_ADDR_0, RG_PAN_ID_0, RG_PHY_TX_PWR, RG_SHORT_ADDR_0, RX_AACK_ON, set_trx_state(), SR_AACK_I_AM_COORD, SR_CC_NUMBER, SR_CCA_MODE, SR_CHANNEL, SR_MAX_BE, SR_MIN_BE, SR_TX_PWR, TAL_BUSY, TAL_IDLE, tal_pib, tal_rx_buffer, tal_rx_on_required, tal_state, TAL_TRX_ASLEEP, tal_trx_status, tal_trx_wakeup(), TRX_OFF, TRX_SLEEP, TRX_SUPPORTED_CHANNELS, and TRX_SUPPORTED_CHANNELS_CHINA.
void write_all_tal_pib_to_trx | ( | void | ) |
Write all shadow PIB variables to the transceiver.
This function writes all shadow PIB variables to the transceiver. It is assumed that the radio does not sleep.
References apply_channel_page_configuration(), CMD_RX_ON, convert_phyTransmitPower_to_reg_value(), i, RG_IEEE_ADDR_0, RG_PAN_ID_0, RG_PHY_TX_PWR, RG_SHORT_ADDR_0, set_trx_state(), SR_AACK_I_AM_COORD, SR_CCA_MODE, SR_CHANNEL, SR_MAX_BE, SR_MAX_CSMA_RETRIES, SR_MAX_FRAME_RETRIES, SR_MIN_BE, SR_TX_PWR, and tal_pib.