Microchip® Advanced Software Framework

at86rf233/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 "at86rf233.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

References CMD_DEEP_SLEEP, CMD_SLEEP, CMD_TRX_OFF, MAC_INVALID_PARAMETER, MAC_SUCCESS, pal_timer_source_select(), pal_timer_stop(), set_trx_state(), SLEEP_MODE_1, stb_restart(), TAL_BUSY, TAL_IDLE, tal_rx_on_required, tal_state, TAL_TRX_ASLEEP, tal_trx_status, TMR_CLK_SRC_DURING_TRX_SLEEP, TRX_DEEP_SLEEP, TRX_OFF, and TRX_SLEEP.

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

References Assert, CMD_TRX_OFF, FAILURE, FUNC_PTR, MAC_SUCCESS, NULL, pal_timer_source_select(), pal_timer_start(), set_trx_state(), TAL_TRX_AWAKE, tal_trx_status, TIMEOUT_RELATIVE, TMR_CLK_SRC_DURING_TRX_AWAKE, TRX_DEEP_SLEEP, TRX_OFF, and TRX_SLEEP.