Microchip® Advanced Software Framework

at86rf215/src/tal_rx_enable.c File Reference
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "pal.h"
#include "return_val.h"
#include "tal.h"
#include "ieee_const.h"
#include "tal_config.h"
#include "bmm.h"
#include "qmm.h"
#include "tal_internal.h"

Functions

uint8_t tal_rx_enable (trx_id_t trx_id, uint8_t state)
 Switches receiver on or off. More...
 

uint8_t tal_rx_enable ( trx_id_t  trx_id,
uint8_t  state 
)

Switches receiver on or off.

This function switches the receiver on (PHY_RX_ON) or off (PHY_TRX_OFF).

Parameters
trx_idTransceiver identifier
stateNew state of receiver
Returns
  • TAL_BUSY if the TAL state machine cannot switch receiver on or off,
  • PHY_TRX_OFF if receiver has been switched off, or
  • PHY_RX_ON otherwise.

References Assert, NUM_TRX, pal_is_timer_running(), PHY_RX_ON, PHY_TRX_OFF, RF09, RF_BASE_ADDR_OFFSET, RF_RX, RF_TRXOFF, RG_RF09_CMD, start_rpc(), stop_rpc(), switch_to_rx(), switch_to_txprep(), tal_buf_shortage, TAL_BUSY, TAL_IDLE, TAL_SLEEP, tal_state, TAL_TRX_ASLEEP, trx_default_state, and trx_state.