The Atmel transceivers provide a variety of additional hardware features features that are not reflected in the IEEE 802.15.4 standard.
These features are for eg .Reading battery voltage, Continuous wave transmission etc .
Macros | |
#define | SUPPLY_VOLTAGE_ABOVE_UPPER_LIMIT (0xFFFF) |
Supply voltage above upper limit. More... | |
#define | SUPPLY_VOLTAGE_BELOW_LOWER_LIMIT (0) |
Supply voltage below lower limit. More... | |
#define | TFA_PIB_RX_SENS_DEF (RSSI_BASE_VAL_DBM) |
Default value of TFA PIB attribute to reduce the Rx sensitivity. More... | |
Typedefs | |
typedef enum continuous_tx_mode_tag | continuous_tx_mode_t |
Continuous Transmission modes. More... | |
typedef enum tfa_pib_t | tfa_pib_t |
Transceiver commands. More... | |
Enumerations | |
enum | continuous_tx_mode_tag { CW_MODE = 0, PRBS_MODE = 1 } |
Continuous Transmission modes. More... | |
enum | tfa_pib_t { TFA_PIB_RX_SENS = 0 } |
Transceiver commands. More... | |
Functions | |
retval_t | tfa_batmon_irq_init (FUNC_PTR(batmon_irq_cb), uint16_t vth) |
Setups the battery monitor interrupt. More... | |
phy_enum_t | tfa_cca_perform (trx_id_t trx_id) |
Perform a CCA. More... | |
void | tfa_continuous_tx_start (trx_id_t trx_id, continuous_tx_mode_t tx_mode) |
Starts continuous transmission on current channel. More... | |
void | tfa_continuous_tx_stop (trx_id_t trx_id) |
Stops CW transmission. More... | |
uint8_t | tfa_ed_sample (trx_id_t trx_id) |
Perform a single ED measurement. More... | |
uint16_t | tfa_get_batmon_voltage (void) |
Gets the transceiver's supply voltage. More... | |
double | tfa_get_temperature (void) |
Get the temperature value from the integrated sensor. More... | |
retval_t | tfa_init (void) |
Initializes the TFA. More... | |
retval_t | tfa_pib_get (tfa_pib_t tfa_pib_attribute, void *value) |
Gets a TFA PIB attribute. More... | |
retval_t | tfa_pib_set (tfa_pib_t tfa_pib_attribute, void *value) |
Sets a TFA PIB attribute. More... | |
void | tfa_reset (bool set_default_pib) |
Reset the TFA. More... | |
#define SUPPLY_VOLTAGE_ABOVE_UPPER_LIMIT (0xFFFF) |
Supply voltage above upper limit.
#define SUPPLY_VOLTAGE_BELOW_LOWER_LIMIT (0) |
Supply voltage below lower limit.
#define TFA_PIB_RX_SENS_DEF (RSSI_BASE_VAL_DBM) |
Default value of TFA PIB attribute to reduce the Rx sensitivity.
By default, reduced sensitivity is disabled.
typedef enum continuous_tx_mode_tag continuous_tx_mode_t |
Continuous Transmission modes.
enum tfa_pib_t |
Setups the battery monitor interrupt.
batmon_irq_cb | Callback function for the batmon interrupt |
vth | Threshold value in millivolt |
References BATMON_MON_VTH_MAX, BATMON_MON_VTH_MIN, irq_hdl_batmon, MAC_INVALID_PARAMETER, MAC_SUCCESS, SR_RF_BMDVC_BMHR, SR_RF_BMDVC_BMVTH, and trx_bit_write().
phy_enum_t tfa_cca_perform | ( | trx_id_t | trx_id | ) |
Perform a CCA.
This function performs a CCA request.
trx_id | Transceiver identifier |
This blocking function performs a CCA request.
References pal_timer_delay, PHY_BUSY, PHY_IDLE, RF_BASE_ADDR_OFFSET, RF_EDSINGLE, RF_IRQ_EDC, RF_RX, RF_TRXOFF, RG_RF09_CMD, RG_RF09_EDC, RG_RF09_EDV, SR_BBC0_PC_BBEN, SR_RF09_IRQM_EDC, switch_to_rx(), switch_to_txprep(), tal_current_ed_val, TAL_IDLE, tal_pib, TAL_RF_IRQ_CLR, TAL_RF_IS_IRQ_SET, tal_state, TAL_TFA_CCA, trx_bit_write(), trx_reg_read(), trx_reg_write(), and trx_state.
void tfa_continuous_tx_start | ( | trx_id_t | trx_id, |
continuous_tx_mode_t | tx_mode | ||
) |
Starts continuous transmission on current channel.
trx_if | Transceiver identifier |
tx_mode | Transmission mode |
random_content | Use random content if true |
trx_id | Identifier of the transceiver |
tx_mode | Transmission mode |
References BB_TX_FRM_BUF_OFFSET, CW_MODE, data, LEG_OQPSK, RF09, RF24, RF_BASE_ADDR_OFFSET, RF_RX, RF_TX, RG_BBC0_FBTXS, RG_BBC0_TXFLL, RG_RF09_CMD, RG_RF09_TXDACI, SR_BBC0_PC_CTX, SR_RF_IQIFC0_EEC, SR_RF_IQIFC1_CHPM, switch_to_txprep(), TAL_IDLE, tal_pib, tal_state, TAL_TFA_CW, TAL_TFA_CW_RX, trx_bit_write(), trx_reg_write(), trx_state, and trx_write().
Referenced by pulse_cw_transmission(), and start_cw_transmission().
void tfa_continuous_tx_stop | ( | trx_id_t | trx_id | ) |
Stops CW transmission.
trx_if | Transceiver identifier |
trx_id | Identifier of the transceiver |
References RF_BASE_ADDR_OFFSET, RF_TRXOFF, RFT_TST_ADDR_OFFSET, RG_RF09_CMD, RG_RF09_TXDACI, SR_BBC0_PC_CTX, SR_RF_IQIFC0_EEC, SR_RF_IQIFC1_CHPM, switch_to_rx(), switch_to_txprep(), TAL_IDLE, tal_state, TAL_TFA_CW_RX, trx_bit_write(), trx_reg_write(), trx_state, and trx_write().
Referenced by stop_cw_transmission(), and stop_pulse_cb().
uint8_t tfa_ed_sample | ( | trx_id_t | trx_id | ) |
Perform a single ED measurement.
trx_id | Identifier of the transceiver |
uint16_t tfa_get_batmon_voltage | ( | void | ) |
Gets the transceiver's supply voltage.
References BATMON_MON_VTH_MAX, BATMON_MON_VTH_MIN, NUM_TRX, pal_timer_delay, RF09, RF24, RF_BASE_ADDR_OFFSET, RF_IRQ_BATLOW, RF_IRQ_TRXRDY, RG_RF09_IRQS, SR_RF09_IRQM_BATLOW, SR_RF_BMDVC_BMHR, SR_RF_BMDVC_BMS, SR_RF_BMDVC_BMVTH, TAL_RF_IRQ_ADD, TAL_RF_IRQ_CLR, TAL_SLEEP, tal_state, trx_bit_read(), trx_bit_write(), and trx_read().
Referenced by get_sensor_data().
double tfa_get_temperature | ( | void | ) |
Get the temperature value from the integrated sensor.
Referenced by get_sensor_data().
retval_t tfa_init | ( | void | ) |
Initializes the TFA.
This function is called to initialize the TFA.
Gets a TFA PIB attribute.
This function is called to retrieve the transceiver information base attributes.
[in] | tfa_pib_attribute | TAL infobase attribute ID |
[out] | value | TFA infobase attribute value |
Sets a TFA PIB attribute.
This function is called to set the transceiver information base attributes.
[in] | tfa_pib_attribute | TFA infobase attribute ID |
[in] | value | TFA infobase attribute value to be set |
void tfa_reset | ( | bool | set_default_pib | ) |
Reset the TFA.
This function is called to reset the TFA.
set_default_pib | Defines whether PIB values need to be set to its default values |