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_BPSK_40_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, CW_MODE_2 = 2, CW_ALL_ZEROS_MODE = 3 } |
Continuous Transmission modes. More... | |
enum | tfa_pib_t { TFA_PIB_RX_SENS = 0 } |
Transceiver commands. More... | |
Functions | |
static void | init_tfa_pib (void) |
Initialize the TFA PIB. More... | |
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... | |
static void | write_all_tfa_pibs_to_trx (void) |
Write all shadow PIB variables to the transceiver. More... | |
#define SUPPLY_VOLTAGE_ABOVE_UPPER_LIMIT (0xFFFF) |
Supply voltage above upper limit.
Referenced by tfa_get_batmon_voltage().
#define SUPPLY_VOLTAGE_BELOW_LOWER_LIMIT (0) |
Supply voltage below lower limit.
Referenced by tfa_get_batmon_voltage().
#define TFA_PIB_RX_SENS_DEF (RSSI_BASE_VAL_BPSK_40_DBM) |
Default value of TFA PIB attribute to reduce the Rx sensitivity.
By default, reduced sensitivity is disabled.
Referenced by init_tfa_pib().
typedef enum continuous_tx_mode_tag continuous_tx_mode_t |
Continuous Transmission modes.
enum tfa_pib_t |
|
static |
Initialize the TFA PIB.
This function initializes the TFA information base attributes to their default values.
References tfa_pib_rx_sens, and TFA_PIB_RX_SENS_DEF.
Referenced by tfa_init(), and tfa_reset().
Setups the battery monitor interrupt.
batmon_irq_cb | Callback function for the batmon interrupt |
vth | Threshold value in millivolt |
phy_enum_t tfa_cca_perform | ( | trx_id_t | trx_id | ) |
Perform a CCA.
This function performs a CCA request.
trx_id | Transceiver identifier |
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 |
void tfa_continuous_tx_stop | ( | trx_id_t | trx_id | ) |
Stops CW transmission.
trx_if | Transceiver identifier |
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_ABOVE_THRES, BATMON_BELOW_THRES, BATMON_HIGH_RANGE, BATMON_HR_HIGH, BATMON_HR_LOW, BATMON_LOW_RANGE, BATMON_NOT_VALID, BATMON_VALID, CMD_SLEEP, CMD_TRX_OFF, HIGH, LOW, pal_timer_delay, pal_trx_irq_dis, pal_trx_irq_en, RG_IRQ_STATUS, set_trx_state(), SR_BATMON_HR, SR_BATMON_OK, SR_BATMON_VTH, SUPPLY_VOLTAGE_ABOVE_UPPER_LIMIT, SUPPLY_VOLTAGE_BELOW_LOWER_LIMIT, tal_trx_status, trx_bit_read(), trx_bit_write(), trx_reg_read(), and TRX_SLEEP.
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.
References init_tfa_pib(), MAC_SUCCESS, and write_all_tfa_pibs_to_trx().
Referenced by tal_init().
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 |
References MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, TFA_PIB_RX_SENS, and tfa_pib_rx_sens.
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 |
References MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, RSSI_BASE_VAL_BPSK_20_DBM, RSSI_BASE_VAL_BPSK_300_DBM, RSSI_BASE_VAL_BPSK_40_DBM, RSSI_BASE_VAL_BPSK_600_DBM, RSSI_BASE_VAL_DBM, RSSI_BASE_VAL_OQPSK_1000_RC_DBM, RSSI_BASE_VAL_OQPSK_1000_SIN_DBM, RSSI_BASE_VAL_OQPSK_100_DBM, RSSI_BASE_VAL_OQPSK_400_SIN_RC_DBM, RSSI_BASE_VAL_OQPSK_RC_250_DBM, RSSI_BASE_VAL_OQPSK_SIN_250_DBM, SR_RX_PDT_LEVEL, tal_pib, TFA_PIB_RX_SENS, tfa_pib_rx_sens, and trx_bit_write().
Referenced by write_all_tfa_pibs_to_trx().
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 |
References init_tfa_pib(), and write_all_tfa_pibs_to_trx().
Referenced by tal_reset().
|
static |
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 TFA_PIB_RX_SENS, tfa_pib_rx_sens, and tfa_pib_set().
Referenced by tfa_init(), and tfa_reset().