AIROC™ BTSDK v4.4 - Documentation | ||||
Wiced Low Power Mode Utilities. More...
Typedefs | |
typedef void | wiced_power_save_cback_t (void) |
Power Save callback. More... | |
typedef uint32_t | wiced_power_save_approve_cback_t (void) |
Power Save approve callback. More... | |
Enumerations | |
enum | wiced_wake_source_t { WICED_WAKE_SOURCE_GPIO = 0x01, WICED_WAKE_SOURCE_TIMEOUT = 0x02, WICED_WAKE_SOURCE_ALL = WICED_WAKE_SOURCE_GPIO|WICED_WAKE_SOURCE_TIMEOUT } |
Wake Up Sources .Used when calling wiced_start_power_save. More... | |
Functions | |
void | wiced_power_save_start (wiced_wake_source_t wake_source, uint32_t timeout_ms) |
Function wiced_power_save_start. More... | |
void | wiced_power_save_register_approve_cback (wiced_power_save_approve_cback_t *p_cback) |
Function wiced_power_save_register_approve_cback. More... | |
void | wiced_power_save_register_enter_cback (wiced_power_save_cback_t *p_cback) |
Function wiced_power_save_register_enter_cback. More... | |
void | wiced_power_save_register_abort_cback (wiced_power_save_cback_t *p_cback) |
Function wiced_power_save_register_abort_cback. More... | |
void | wiced_power_save_store_state (uint16_t value) |
Function wiced_power_save_store_state. More... | |
uint16_t | wiced_power_save_retrieve_state (void) |
Function wiced_power_save_retrieve_state. More... | |
void | wiced_sleep_config (wiced_bool_t enable, wiced_bool_t bt_wake_gpio_active_mode, wiced_bool_t host_wake_gpio_active_mode) |
Function wiced_sleep_config. More... | |
Wiced Low Power Mode Utilities.
typedef uint32_t wiced_power_save_approve_cback_t(void) |
Power Save approve callback.
Callback to the application to check if the application approves the device to go to power save mode Registered using wiced_power_save_register_approve_cback().
typedef void wiced_power_save_cback_t(void) |
Power Save callback.
Callback to the application on entering to power save mode or if entering to the power save mode is aborted Registered using wiced_power_save_register_enter_cback() and wiced_power_save_register_abort_cback()
enum wiced_wake_source_t |
void wiced_power_save_register_abort_cback | ( | wiced_power_save_cback_t * | p_cback | ) |
Function wiced_power_save_register_abort_cback.
Registers the callback function which will be invoked if entering to the power save mode is aborted
[in] | p_cback | : callback function which will be invoked if entering to the power save mode is aborted |
void wiced_power_save_register_approve_cback | ( | wiced_power_save_approve_cback_t * | p_cback | ) |
Function wiced_power_save_register_approve_cback.
Registers the callback function which will be invoked to check if the application approves the device to go to power save mode
[in] | p_cback | : Callback function which will be invoked to check if the application approves the device to go to power save mode |
void wiced_power_save_register_enter_cback | ( | wiced_power_save_cback_t * | p_cback | ) |
Function wiced_power_save_register_enter_cback.
Registers the callback function which will be invoked just before device entering the power save mode
[in] | p_cback | : callback function which will be invoked just before device entering the power save mode |
uint16_t wiced_power_save_retrieve_state | ( | void | ) |
Function wiced_power_save_retrieve_state.
Application can invoke this function to retrieve any saved state values on waking from power save mode
void wiced_power_save_start | ( | wiced_wake_source_t | wake_source, |
uint32_t | timeout_ms | ||
) |
Function wiced_power_save_start.
To start the power save mode of operation. This is the most efficient power save option available. Be cautious on using this power save mode. Application will be restarted on exiting out of the power save mode. If the application desires to save any state before going to power save it can do so by using wiced_power_save_store_state() and retrieve the state on coming back from power save by using wiced_power_save_retrieve_state()
[in] | wake_source | : Bit mask of sources to wake the device from power save mode |
[in] | timeout_ms | : Timeout in milliseconds to wake the device from power save mode. Used when WICED_WAKE_SOURCE_TIMEOUT is specified as wake source |
void wiced_power_save_store_state | ( | uint16_t | value | ) |
Function wiced_power_save_store_state.
Application can invoke this function to store any state values before going to power save mode
[in] | value | : Value to be saved. |
void wiced_sleep_config | ( | wiced_bool_t | enable, |
wiced_bool_t | bt_wake_gpio_active_mode, | ||
wiced_bool_t | host_wake_gpio_active_mode | ||
) |
Function wiced_sleep_config.
Application can invoke this function to enable/disbale low power mode of operation. Application resumes on waking from sleep. Application can also configure the active modes of the BT WAKE GPIO and the HOST WAKE GPIO using this function. BT WAKE GPIO -Host can wake the device from sleep by setting the BT wake pin, active if the device is in sleep mode HOST WAKE GPIO - Device can wake the host from sleep by setting the HOST wake pin, active
[in] | enable | : Enable or disable the sleep mode |
[in] | bt_wake_gpio_active_mode | : Active Mode of the BT Wake pin |
[in] | host_wake_gpio_active_mode | : Active Mode of the Host Wake pin |