Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Data Structures | |
struct | pm_state_info |
Macros | |
#define | PM_STATE_INFO_DT_ITEM_BY_IDX(node_id, i) |
Construct a pm_state_info from 'cpu-power-states' property at index 'i'. More... | |
#define | PM_STATE_DT_ITEMS_LEN(node_id) DT_PROP_LEN_OR(node_id, cpu_power_states, 0) |
Length of 'cpu-power-states' property. More... | |
#define | PM_STATE_INFO_DT_ITEMS_LISTIFY_FUNC(child, node_id) PM_STATE_INFO_DT_ITEM_BY_IDX(node_id, child) |
Macro function to construct enum pm_state item in UTIL_LISTIFY extension. More... | |
#define | PM_STATE_INFO_DT_ITEMS_LIST(node_id) |
Macro function to construct a list of 'pm_state_info' items by UTIL_LISTIFY func. More... | |
#define | PM_STATE_DT_ITEM_BY_IDX(node_id, i) |
Construct a pm_state enum from 'cpu-power-states' property at index 'i'. More... | |
#define | PM_STATE_DT_ITEMS_LISTIFY_FUNC(child, node_id) PM_STATE_DT_ITEM_BY_IDX(node_id, child) |
Macro function to construct enum pm_state item in UTIL_LISTIFY extension. More... | |
#define | PM_STATE_DT_ITEMS_LIST(node_id) |
Macro function to construct a list of enum pm_state items by UTIL_LISTIFY func. More... | |
Enumerations | |
enum | pm_state { PM_STATE_ACTIVE , PM_STATE_RUNTIME_IDLE , PM_STATE_SUSPEND_TO_IDLE , PM_STATE_STANDBY , PM_STATE_SUSPEND_TO_RAM , PM_STATE_SUSPEND_TO_DISK , PM_STATE_SOFT_OFF } |
#define PM_STATE_DT_ITEM_BY_IDX | ( | node_id, | |
i | |||
) |
#include <include/pm/state.h>
Construct a pm_state enum from 'cpu-power-states' property at index 'i'.
node_id | A node identifier with compatible zephyr,power-state |
i | index into cpu-power-states property |
#define PM_STATE_DT_ITEMS_LEN | ( | node_id | ) | DT_PROP_LEN_OR(node_id, cpu_power_states, 0) |
#include <include/pm/state.h>
Length of 'cpu-power-states' property.
node_id | A node identifier with compatible zephyr,power-state |
#define PM_STATE_DT_ITEMS_LIST | ( | node_id | ) |
#include <include/pm/state.h>
Macro function to construct a list of enum pm_state items by UTIL_LISTIFY func.
Example devicetree fragment: cpus { ... cpu0: cpu@0 { device_type = "cpu"; ... cpu-power-states = <&state0 &state1>; }; };
... state0: state0 { compatible = "zephyr,power-state"; power-state-name = "suspend-to-idle"; min-residency-us = <10000>; exit-latency-us = <100>; };
state1: state1 { compatible = "zephyr,power-state"; power-state-name = "suspend-to-ram"; min-residency-us = <50000>; exit-latency-us = <500>; };
Example usage: * const enum pm_state states[] = PM_STATE_DT_ITEMS_LIST(DT_NODELABEL(cpu0));
node_id | A node identifier with compatible zephyr,power-state |
#define PM_STATE_DT_ITEMS_LISTIFY_FUNC | ( | child, | |
node_id | |||
) | PM_STATE_DT_ITEM_BY_IDX(node_id, child) |
#include <include/pm/state.h>
Macro function to construct enum pm_state item in UTIL_LISTIFY extension.
child | child index in UTIL_LISTIFY extension. |
node_id | A node identifier with compatible zephyr,power-state |
#define PM_STATE_INFO_DT_ITEM_BY_IDX | ( | node_id, | |
i | |||
) |
#include <include/pm/state.h>
Construct a pm_state_info from 'cpu-power-states' property at index 'i'.
node_id | A node identifier with compatible zephyr,power-state |
i | index into cpu-power-states property |
#define PM_STATE_INFO_DT_ITEMS_LIST | ( | node_id | ) |
#include <include/pm/state.h>
Macro function to construct a list of 'pm_state_info' items by UTIL_LISTIFY func.
Example devicetree fragment: cpus { ... cpu0: cpu@0 { device_type = "cpu"; ... cpu-power-states = <&state0 &state1>; }; };
... power-states { state0: state0 { compatible = "zephyr,power-state"; power-state-name = "suspend-to-idle"; min-residency-us = <10000>; exit-latency-us = <100>; };
state1: state1 { compatible = "zephyr,power-state"; power-state-name = "suspend-to-ram"; min-residency-us = <50000>; exit-latency-us = <500>; }; };
Example usage: * const struct pm_state_info states[] = PM_STATE_INFO_DT_ITEMS_LIST(DT_NODELABEL(cpu0));
node_id | A node identifier with compatible zephyr,power-state |
#define PM_STATE_INFO_DT_ITEMS_LISTIFY_FUNC | ( | child, | |
node_id | |||
) | PM_STATE_INFO_DT_ITEM_BY_IDX(node_id, child) |
#include <include/pm/state.h>
Macro function to construct enum pm_state item in UTIL_LISTIFY extension.
child | child index in UTIL_LISTIFY extension. |
node_id | A node identifier with compatible zephyr,power-state |
enum pm_state |
#include <include/pm/state.h>
Power management state