Microchip® Advanced Software Framework

at86rf231/src/tal_pwr_mgmt.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "pal.h"
#include "return_val.h"
#include "tal.h"
#include "tal_constants.h"
#include "at86rf231.h"
#include "tal_internal.h"
#include "sal_types.h"
#include "stb.h"

Functions

retval_t tal_trx_sleep (sleep_mode_t mode)
 Sets the transceiver to sleep. More...
 
retval_t tal_trx_wakeup (void)
 Wakes up the transceiver from sleep. More...
 

retval_t tal_trx_sleep ( sleep_mode_t  mode)

Sets the transceiver to sleep.

This function sets the transceiver to sleep state.

Parameters
modeDefines sleep mode of transceiver SLEEP or PHY_TRX_OFF)
Returns
TAL_BUSY - The transceiver is busy in TX or RX MAC_SUCCESS - The transceiver is put to sleep TAL_TRX_ASLEEP - The transceiver is already asleep MAC_INVALID_PARAMETER - The specified sleep mode is not supported

Referenced by mac_trx_init_sleep(), mlme_set(), toggle_trx_sleep(), and trx_config().

retval_t tal_trx_wakeup ( void  )

Wakes up the transceiver from sleep.

This function awakes the transceiver from sleep state.

Returns
TAL_TRX_AWAKE - The transceiver is already awake MAC_SUCCESS - The transceiver is woken up from sleep FAILURE - The transceiver did not wake-up from sleep

Referenced by mac_trx_wakeup(), mlme_set(), stb_ccm_secure(), tal_pib_set(), toggle_trx_sleep(), and trx_config().