This file contains types and variable definition that are used within the TAL only.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include "tal.h"
#include "tal_config.h"
#include "pal.h"
#include "ieee_154g.h"
#include "at86rf215.h"
Macros | |
#define | BB_BASE_ADDR_OFFSET |
Register offset between the baseband cores. More... | |
#define | BB_RX_FRM_BUF_OFFSET (RG_BBC1_FBRXS - RG_BBC0_FBRXS) |
Register offset between the Rx frame buffers. More... | |
#define | BB_TX_FRM_BUF_OFFSET (RG_BBC1_FBTXS - RG_BBC0_FBTXS) |
Register offset between the Tx frame buffers. More... | |
#define | RF_BASE_ADDR_OFFSET |
Register offset between RF09 and TRX24. More... | |
#define | RFT_TST_ADDR_OFFSET (0x280 - 0x180) |
Register offset for test register area. More... | |
#define | TAL_BB_IRQ_ADD(BB_CORE, IRQ) tal_bb_irqs[BB_CORE] |= IRQ |
Add interrupt(s) for provided baseband core. More... | |
#define | TAL_BB_IRQ_CLR(BB_CORE, IRQ) |
Clear interrupt(s) for provided baseband core, avoid Pa091. More... | |
#define | TAL_BB_IRQ_CLR_ALL(BB_CORE) tal_bb_irqs[BB_CORE] = BB_IRQ_NO_IRQ |
Clear all interrupts for provided baseband core. More... | |
#define | TAL_BB_IS_IRQ_SET(BB_CORE, IRQ) ((tal_bb_irqs[BB_CORE] & IRQ) ? 1 : 0) |
Check if certain IRQ is set for provided baseband core. More... | |
#define | TAL_RF_IRQ_ADD(RF_CORE, IRQ) tal_rf_irqs[RF_CORE] |= IRQ |
Add interrupt(s) for provided radio core. More... | |
#define | TAL_RF_IRQ_CLR(RF_CORE, IRQ) |
Clear interrupt(s) for provided radio core, avoid Pa091. More... | |
#define | TAL_RF_IRQ_CLR_ALL(RF_CORE) tal_rf_irqs[RF_CORE] = RF_IRQ_NO_IRQ |
Clear all interrupts for provided radio core. More... | |
#define | TAL_RF_IS_IRQ_SET(RF_CORE, IRQ) ((tal_rf_irqs[RF_CORE] & IRQ) ? 1 : 0) |
Check if certain IRQ is set for provided radio core. More... | |
#define | TRX_SUPPORTED_CHANNELS_LEG(trx) |
#define | TX_PWR_TOLERANCE (0x80) |
Typedefs | |
typedef enum trx_id_tag | trx_id_t |
Enumeration for TRX identification. More... | |
Enumerations | |
enum | trx_id_tag { RF09, RF24, RFBOTH } |
Enumeration for TRX identification. More... | |
Functions | |
void | get_fsk_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, fsk_op_mode_t option, uint32_t *freq, uint32_t *spacing) |
Gets the FSK center frequency F0. More... | |
void | get_leg_oqpsk_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, uint32_t *freq, uint32_t *spacing) |
Gets the Legacy OQPSK center frequency F0. More... | |
void | get_ofdm_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, ofdm_option_t option, uint32_t *freq, uint32_t *spacing) |
Gets the OFDM center frequency F0. More... | |
oqpsk_chip_rate_t | get_oqpsk_chip_rate (trx_id_t trx_id, sun_freq_band_t freq_band) |
Gets the OQPSK Chiprate. More... | |
void | get_oqpsk_freq_f0 (trx_id_t trx_id, sun_freq_band_t freq_band, uint32_t *freq, uint32_t *spacing) |
Gets the OQPSK center frequency F0. More... | |
uint16_t | get_sun_max_ch_no (trx_id_t trx_id) |
Gets Maximum no of channel supported by each modulation. More... | |
#define BB_BASE_ADDR_OFFSET |
Register offset between the baseband cores.
#define BB_RX_FRM_BUF_OFFSET (RG_BBC1_FBRXS - RG_BBC0_FBRXS) |
Register offset between the Rx frame buffers.
Referenced by trx_irq_handler_cb(), and upload_frame().
#define BB_TX_FRM_BUF_OFFSET (RG_BBC1_FBTXS - RG_BBC0_FBTXS) |
Register offset between the Tx frame buffers.
Referenced by tfa_continuous_tx_start(), and transmit_frame().
#define RF_BASE_ADDR_OFFSET |
Register offset between RF09 and TRX24.
Referenced by ack_timout_cb(), ack_transmission_done(), apply_channel_settings(), cca_start(), complete_rx_transaction(), conf_fsk(), conf_leg_oqpsk(), conf_ofdm(), conf_oqpsk(), conf_trx_modulation(), config_fsk_rpc(), config_phy(), crc_check_ok(), fsk_rfcfg(), handle_ed_end_irq(), handle_incoming_frame(), handle_rx_end_irq(), handle_trxerr(), handle_tx_end_irq(), ofdm_rfcfg(), oqpsk_rfcfg(), set_channel(), set_ed_sample_duration(), set_fsk_pibs(), set_sfd(), set_tx_pwr(), start_ack_wait_timer(), start_rpc(), stop_ed_scan(), stop_rpc(), switch_to_rx(), switch_to_txprep(), tal_ed_start(), tal_generate_rand_seed(), tal_get_curr_trx_config(), tal_get_trx_status(), tal_pib_set(), tal_rx_enable(), tal_rxaack_prom_mode_ctrl(), tal_trx_sleep(), tal_trx_wakeup(), tfa_cca_perform(), tfa_continuous_tx_start(), tfa_continuous_tx_stop(), tfa_get_batmon_voltage(), transmit_frame(), trx_config(), trx_irq_handler_cb(), trx_reset(), tx_done_handling(), upload_frame(), wait_for_freq_settling(), wait_for_txprep(), and write_all_tal_pib_to_trx().
#define RFT_TST_ADDR_OFFSET (0x280 - 0x180) |
Register offset for test register area.
Referenced by tfa_continuous_tx_stop().
#define TAL_BB_IRQ_ADD | ( | BB_CORE, | |
IRQ | |||
) | tal_bb_irqs[BB_CORE] |= IRQ |
Add interrupt(s) for provided baseband core.
#define TAL_BB_IRQ_CLR | ( | BB_CORE, | |
IRQ | |||
) |
Clear interrupt(s) for provided baseband core, avoid Pa091.
Referenced by tal_task(), and transmit_frame().
#define TAL_BB_IRQ_CLR_ALL | ( | BB_CORE | ) | tal_bb_irqs[BB_CORE] = BB_IRQ_NO_IRQ |
Clear all interrupts for provided baseband core.
Referenced by cancel_any_reception(), and tal_trx_sleep().
#define TAL_BB_IS_IRQ_SET | ( | BB_CORE, | |
IRQ | |||
) | ((tal_bb_irqs[BB_CORE] & IRQ) ? 1 : 0) |
Check if certain IRQ is set for provided baseband core.
#define TAL_RF_IRQ_ADD | ( | RF_CORE, | |
IRQ | |||
) | tal_rf_irqs[RF_CORE] |= IRQ |
Add interrupt(s) for provided radio core.
Referenced by tfa_get_batmon_voltage().
#define TAL_RF_IRQ_CLR | ( | RF_CORE, | |
IRQ | |||
) |
Clear interrupt(s) for provided radio core, avoid Pa091.
Referenced by stop_ed_scan(), tal_task(), tal_trx_wakeup(), tfa_cca_perform(), tfa_get_batmon_voltage(), transmit_frame(), and trx_reset().
#define TAL_RF_IRQ_CLR_ALL | ( | RF_CORE | ) | tal_rf_irqs[RF_CORE] = RF_IRQ_NO_IRQ |
Clear all interrupts for provided radio core.
Referenced by cancel_any_reception(), tal_trx_sleep(), and trx_reset().
#define TAL_RF_IS_IRQ_SET | ( | RF_CORE, | |
IRQ | |||
) | ((tal_rf_irqs[RF_CORE] & IRQ) ? 1 : 0) |
Check if certain IRQ is set for provided radio core.
Referenced by tal_trx_wakeup(), and tfa_cca_perform().
#define TRX_SUPPORTED_CHANNELS_LEG | ( | trx | ) |
Referenced by handle_incoming_msg().
#define TX_PWR_TOLERANCE (0x80) |
typedef enum trx_id_tag trx_id_t |
Enumeration for TRX identification.
enum trx_id_tag |
void get_fsk_freq_f0 | ( | trx_id_t | trx_id, |
sun_freq_band_t | freq_band, | ||
fsk_op_mode_t | option, | ||
uint32_t * | freq, | ||
uint32_t * | spacing | ||
) |
Gets the FSK center frequency F0.
[in] | trx_id | Transceiver identifier |
[in] | freq_band | Frequency band |
[in] | option | FSK operating mode |
[out] | freq | Pointer to frequency F0 |
[out] | spacing | Pointer to Channel spacing |
References FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.
Referenced by perf_set_sun_page().
void get_leg_oqpsk_freq_f0 | ( | trx_id_t | trx_id, |
sun_freq_band_t | freq_band, | ||
uint32_t * | freq, | ||
uint32_t * | spacing | ||
) |
Gets the Legacy OQPSK center frequency F0.
[in] | trx_id | Transceiver identifier |
[in] | freq_band | Frequency band |
[out] | freq | Pointer to frequency F0 |
[out] | spacing | Pointer to Channel spacing |
References LEG_OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.
Referenced by perf_set_sun_page().
void get_ofdm_freq_f0 | ( | trx_id_t | trx_id, |
sun_freq_band_t | freq_band, | ||
ofdm_option_t | option, | ||
uint32_t * | freq, | ||
uint32_t * | spacing | ||
) |
Gets the OFDM center frequency F0.
[in] | trx_id | Transceiver identifier |
[in] | freq_band | Frequency band |
[in] | option | OFDM option |
[out] | freq | Pointer to frequency F0 |
[out] | spacing | Pointer to Channel spacing |
References OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.
Referenced by perf_set_sun_page().
oqpsk_chip_rate_t get_oqpsk_chip_rate | ( | trx_id_t | trx_id, |
sun_freq_band_t | freq_band | ||
) |
Gets the OQPSK Chiprate.
[in] | trx_id | Transceiver identifier |
[in] | freq_band | Frequency band |
References CHIP_RATE_100, CHIP_RATE_1000, CHIP_RATE_200, CHIP_RATE_2000, OQPSK_CHIP_RATE_FREQ_TABLE_ROW_SIZE, and PGM_READ_WORD.
void get_oqpsk_freq_f0 | ( | trx_id_t | trx_id, |
sun_freq_band_t | freq_band, | ||
uint32_t * | freq, | ||
uint32_t * | spacing | ||
) |
Gets the OQPSK center frequency F0.
[in] | trx_id | Transceiver identifier |
[in] | freq_band | Frequency band |
[out] | freq | Pointer to frequency F0 |
[out] | spacing | Pointer to Channel spacing |
References EU_863, OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, and PGM_READ_DWORD.
Referenced by perf_set_sun_page().
uint16_t get_sun_max_ch_no | ( | trx_id_t | trx_id | ) |
Gets Maximum no of channel supported by each modulation.
[in] | trx_id | Transceiver identifier |
References FSK, FSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, OFDM, OFDM_CH_CENTER_FREQ0_MAP_ROW_SIZE, OQPSK, OQPSK_CH_CENTER_FREQ0_MAP_ROW_SIZE, PGM_READ_DWORD, and tal_pib.
Referenced by apply_channel_settings(), and set_channel_app().