52#define PM_SLEEP_MODE_NAMES \
62#define PM_RUN_MODE_NAMES \
70#ifndef PM_USING_CUSTOM_CONFIG
104#ifndef RT_PM_DEFAULT_SLEEP_MODE
105#define RT_PM_DEFAULT_SLEEP_MODE PM_SLEEP_MODE_NONE
108#ifndef RT_PM_DEFAULT_DEEPSLEEP_MODE
109#define RT_PM_DEFAULT_DEEPSLEEP_MODE PM_SLEEP_MODE_DEEP
112#ifndef RT_PM_DEFAULT_RUN_MODE
113#define RT_PM_DEFAULT_RUN_MODE PM_RUN_MODE_NORMAL_SPEED
119#define RT_PM_DEVICE_CTRL_RELEASE (RT_DEVICE_CTRL_BASE(PM) + 0x00)
120#define RT_PM_DEVICE_CTRL_REQUEST (RT_DEVICE_CTRL_BASE(PM) + 0x01)
rt_err_t rt_pm_sleep_none_request(rt_uint16_t module_id)
rt_err_t rt_pm_sleep_none_release(rt_uint16_t module_id)
rt_err_t rt_pm_release(rt_uint8_t sleep_mode)
void rt_pm_device_unregister(struct rt_device *device)
void rt_pm_notify_set(void(*notify)(rt_uint8_t event, rt_uint8_t mode, void *data), void *data)
rt_uint32_t rt_pm_module_get_status(void)
@ RT_PM_FREQUENCY_PENDING
rt_err_t rt_pm_sleep_light_release(rt_uint16_t module_id)
void rt_system_pm_init(const struct rt_pm_ops *ops, rt_uint8_t timer_mask, void *user_data)
rt_err_t rt_pm_module_release_all(uint8_t module_id, rt_uint8_t sleep_mode)
void rt_pm_module_delay_sleep(rt_uint8_t module_id, rt_tick_t timeout)
rt_err_t rt_pm_sleep_release(rt_uint16_t module_id, rt_uint8_t mode)
void rt_pm_default_set(rt_uint8_t sleep_mode)
rt_err_t rt_pm_module_request(uint8_t module_id, rt_uint8_t sleep_mode)
void rt_pm_device_register(struct rt_device *device, const struct rt_device_pm_ops *ops)
rt_err_t rt_pm_sleep_idle_request(rt_uint16_t module_id)
rt_err_t rt_pm_module_release(uint8_t module_id, rt_uint8_t sleep_mode)
rt_err_t rt_pm_request(rt_uint8_t sleep_mode)
rt_err_t rt_pm_sleep_request(rt_uint16_t module_id, rt_uint8_t mode)
rt_err_t rt_pm_sleep_light_request(rt_uint16_t module_id)
rt_uint8_t rt_pm_get_sleep_mode(void)
rt_err_t rt_pm_release_all(rt_uint8_t sleep_mode)
struct rt_pm * rt_pm_get_handle(void)
rt_err_t rt_pm_sleep_idle_release(rt_uint16_t module_id)
@ PM_RUN_MODE_NORMAL_SPEED
@ PM_RUN_MODE_MEDIUM_SPEED
rt_err_t rt_pm_run_enter(rt_uint8_t run_mode)
unsigned short rt_uint16_t
struct rt_slist_node rt_slist_t
rt_err_t(* suspend)(const struct rt_device *device, rt_uint8_t mode)
rt_err_t(* frequency_change)(const struct rt_device *device, rt_uint8_t mode)
void(* resume)(const struct rt_device *device, rt_uint8_t mode)
const struct rt_device_pm_ops * ops
const struct rt_device * device
void(* notify)(rt_uint8_t event, rt_uint8_t mode, void *data)
rt_tick_t(* timer_get_tick)(struct rt_pm *pm)
void(* timer_stop)(struct rt_pm *pm)
void(* timer_start)(struct rt_pm *pm, rt_uint32_t timeout)
void(* sleep)(struct rt_pm *pm, rt_uint8_t mode)
void(* run)(struct rt_pm *pm, rt_uint8_t mode)
struct rt_pm_module module_status[PM_MODULE_MAX_ID]
rt_uint32_t sleep_status[PM_SLEEP_MODE_MAX - 1][(PM_MODULE_MAX_ID+31)/32]
rt_uint8_t modes[PM_SLEEP_MODE_MAX]
struct rt_device_pm * device_pm
const struct rt_pm_ops * ops