AIROC™ BTSDK v4.9 - Documentation | ||||
This driver provides simplified access to the AIROC sleep framework on the CYW20819 device. More...
Modules | |
Group_sleep_data_structures | |
Group_sleep_defines | |
Group_sleep_enums | |
Typedefs | |
typedef uint32_t(* | wiced_sleep_allow_check_callback )(wiced_sleep_poll_type_t type) |
Prototype for the callback function that needs to be defined by the application. More... | |
typedef void(* | wiced_sleep_post_sleep_callback )(wiced_bool_t restore_configuration) |
Application implements call back of this type to perform post sleep actions. More... | |
Functions | |
wiced_result_t | wiced_sleep_configure (wiced_sleep_config_t *p_sleep_config) |
This API is used to configure various sleep mode parameters (see ) such as interrupt source, GPIO to be used as interrupt etc. More... | |
wiced_sleep_boot_type_t | wiced_sleep_get_boot_mode (void) |
This API is used request the type of reboot. More... | |
wiced_result_t | wiced_sleep_enter_hid_off (uint32_t wakeup_time, uint32_t wake_gpio_pin, wiced_sleep_wake_type_t wake_active_mode) |
This API is used to enter HID OFF mode. More... | |
wiced_sleep_wake_reason_t | wiced_sleep_hid_off_wake_reason (void) |
API to get reset reason. More... | |
This driver provides simplified access to the AIROC sleep framework on the CYW20819 device.
The following APIs allow the application layer to easily configure sleep parameters as well as communicate with the device Power Management Unit (PMU). Using this APIs the application can allow or disallow ePDS when asked by the callback from PMU as well as asynchronously enter HID-Off mode.
defgroup group_sleep_defines Defines defgroup group_sleep_enums ENUMs defgroup group_sleep_data_structures Data Structures
typedef uint32_t(* wiced_sleep_allow_check_callback)(wiced_sleep_poll_type_t type) |
Prototype for the callback function that needs to be defined by the application.
PMU will call this function whenever it want to enter low power mode (ePDS). The PMU will pass the parameter value either as WICED_SLEEP_POLL_TIME_TO_SLEEP or WICED_SLEEP_POLL_SLEEP_PERMISSION and the application needs to return appropriate value (see return description)
[in] | type | Poll type can either be WICED_SLEEP_POLL_TIME_TO_SLEEP or WICED_SLEEP_POLL_SLEEP_PERMISSION (see wiced_sleep_poll_type_t) |
Note:- Application shall return immediately, with the return value specifying whether it allows/disallows sleep. Immediate return is required to allow the maximum time to sleep. Applications shall ensure that all peripheral activity (on PUART, SPI, .. ) is paused before allowing sleep. Any pending activity on the peripherals is lost when the device goes into sleep.
typedef void(* wiced_sleep_post_sleep_callback)(wiced_bool_t restore_configuration) |
Application implements call back of this type to perform post sleep actions.
[out] | restore_configuration | WICED_TRUE - reconfigure configured gpios and re-initialize configured peripherals WICED_FALSE - reconfiguration not required |
wiced_result_t wiced_sleep_configure | ( | wiced_sleep_config_t * | p_sleep_config | ) |
This API is used to configure various sleep mode parameters (see ) such as interrupt source, GPIO to be used as interrupt etc.
[in] | p_sleep_config | see |
wiced_result_t wiced_sleep_enter_hid_off | ( | uint32_t | wakeup_time, |
uint32_t | wake_gpio_pin, | ||
wiced_sleep_wake_type_t | wake_active_mode | ||
) |
This API is used to enter HID OFF mode.
The application can call this API at any time when there is not Bluetooth activity
[in] | wakeup_time | : wake up time in milliseconds. Application can configure for both GPIO wake and/or timed wake. Forever sleep(i.e. no timed wake) can be configure by setting wakeup_time = 0. The max time is 0x3fffff LPO cycles which is ~128010 milliseconds considering 32.768 KHz LPO. LPO can have 3000ppm error in some HW configurations. |
[in] | wake_gpio_pin | LHL GPIO pin number. Range WICED_P00 to WICED_P39. If application does not need to support wake using GPIO, it shall use WICED_HAL_GPIO_PIN_UNUSED. if pin is not LHL pin, device can wake only after wakeup_time. |
[in] | wake_active_mode | Positive edge trigger or negative edge trigger wake can be configured using WICED_GPIO_ACTIVE_HIGH or WICED_GPIO_ACTIVE_LOW respectively. |
wiced_sleep_boot_type_t wiced_sleep_get_boot_mode | ( | void | ) |
This API is used request the type of reboot.
A device is said to cold boot if it is booting from power up or HID-Off mode whereas the device is going through a fast boot if it is booting from shutdown sleep
None |
wiced_sleep_wake_reason_t wiced_sleep_hid_off_wake_reason | ( | void | ) |
API to get reset reason.
returns the reason for wakeup