Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
pm.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012-2014 Wind River Systems, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_PM_PM_H_
8#define ZEPHYR_INCLUDE_PM_PM_H_
9
10#include <zephyr/types.h>
11#include <sys/slist.h>
12#include <pm/state.h>
13#include <toolchain.h>
14#include <stdbool.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
53 sys_snode_t _node;
64};
65
66#ifdef CONFIG_PM
78void pm_power_state_force(struct pm_state_info info);
79
80#ifdef CONFIG_PM_DEBUG
86void pm_dump_debug_info(void);
87#else
88static inline void pm_dump_debug_info(void) { }
89
90#endif /* CONFIG_PM_DEBUG */
91
100void pm_notifier_register(struct pm_notifier *notifier);
101
113int pm_notifier_unregister(struct pm_notifier *notifier);
114
140
155
164
186void pm_power_state_set(struct pm_state_info info);
187
197
202#else /* CONFIG_PM */
203
204#define pm_notifier_register(notifier)
205#define pm_notifier_unregister(notifier) (-ENOSYS)
206
207#define pm_constraint_set(pm_state)
208#define pm_constraint_release(pm_state)
209#define pm_constraint_get(pm_state) (true)
210
211#define pm_power_state_set(info)
212#define pm_power_state_exit_post_ops(info)
213
214#endif /* CONFIG_PM */
215
216void z_pm_save_idle_exit(int32_t ticks);
217
218#ifdef __cplusplus
219}
220#endif
221
222#endif /* ZEPHYR_INCLUDE_PM_PM_H_ */
void
Definition: eswifi_shell.c:15
pm_state
Definition: state.h:26
#define pm_power_state_exit_post_ops(info)
Definition: pm.h:212
#define pm_notifier_unregister(notifier)
Definition: pm.h:205
#define pm_constraint_set(pm_state)
Definition: pm.h:207
void(* state_entry)(enum pm_state state)
Definition: pm.h:58
#define pm_constraint_release(pm_state)
Definition: pm.h:208
#define pm_notifier_register(notifier)
Definition: pm.h:204
#define pm_constraint_get(pm_state)
Definition: pm.h:209
#define pm_power_state_set(info)
Definition: pm.h:211
void(* state_exit)(enum pm_state state)
Definition: pm.h:63
state
Definition: http_parser_state.h:30
Single-linked list implementation.
struct _snode sys_snode_t
Definition: slist.h:33
__INT32_TYPE__ int32_t
Definition: stdint.h:44
Definition: pm.h:52
Definition: state.h:111
Macros to abstract toolchain specific capabilities.