35 #ifndef __HAL_SLEEP_MANAGER_H__ 36 #define __HAL_SLEEP_MANAGER_H__ 37 #include "hal_platform.h" 39 #ifdef HAL_SLEEP_MANAGER_ENABLED 40 #ifdef HAL_SLEEP_MANAGER_SUPPORT_WAKEUP_SOURCE_CONFIG 152 #ifdef HAL_SLEEP_MANAGER_SUPPORT_POWER_OFF 213 #ifdef HAL_SLEEP_MANAGER_SUPPORT_WAKEUP_SOURCE_CONFIG 281 #ifdef HAL_SLEEP_MANAGER_SUPPORT_POWER_OFF bool hal_sleep_manager_is_sleep_locked(void)
This function checks if there are any Sleep Locks in the system.
hal_sleep_manager_status_t hal_sleep_manager_enable_wakeup_pin(hal_sleep_manager_wakeup_source_t pin)
This function enables a specific Wakeup Source.
hal_sleep_mode_t
Sleep modes.
Definition: hal_platform.h:130
An undefined error occurred.
Definition: hal_sleep_manager.h:197
void hal_sleep_manager_enter_sleep_mode(hal_sleep_mode_t mode)
This function sets the system to any of the modes defined in hal_sleep_mode_t.
The operation completed successfully.
Definition: hal_sleep_manager.h:198
hal_sleep_manager_status_t
This enum defines the Sleep Manager API return status.
Definition: hal_sleep_manager.h:196
uint8_t hal_sleep_manager_set_sleep_handle(const char *handle_name)
This function sets up a sleep handle to control the sleep state of the system.
uint32_t hal_sleep_manager_get_lock_status(void)
The sleep lock status is represented by an unsigned integer (uint32_t).
hal_sleep_manager_status_t hal_sleep_manager_unlock_sleep(uint8_t handle_index)
This function unlocks the specific Sleep Lock and permits the MCU going into sleep mode when needed i...
hal_sleep_manager_status_t hal_sleep_manager_init(void)
This function initializes the Sleep Manager.
hal_sleep_manager_wakeup_source_t
sleep_manager wake up source
Definition: hal_platform.h:138
hal_sleep_manager_status_t hal_sleep_manager_disable_wakeup_pin(hal_sleep_manager_wakeup_source_t pin)
This function disables the specific Wakeup Source.
void hal_sleep_manager_enter_power_off_mode(void)
This function sets the system to power off mode.
hal_sleep_manager_status_t hal_sleep_manager_set_sleep_time(uint32_t sleep_time_ms)
Set sleep(suspend) time length.
hal_sleep_manager_status_t hal_sleep_manager_release_sleep_handle(uint8_t handle_index)
This function releases the sleep handle if it is no longer in use.
hal_sleep_manager_status_t hal_sleep_manager_lock_sleep(uint8_t handle_index)
This function prevents the MCU from getting into sleep mode.
bool hal_sleep_manager_is_sleep_handle_alive(uint8_t handle_index)
This function checks whether the sleep handle is still alive.