Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/pm_layered: use array representation, get rid of implicit IDLE mode #17895

Merged
merged 5 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cpu: include IDLE in PM_NUM_MODES
  • Loading branch information
benpicco committed Apr 6, 2022
commit 0340ac61299ec7bc42560327c7d12df3cdb6bb90
2 changes: 1 addition & 1 deletion cpu/atxmega/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ enum {
* @name Power management configuration
* @{
*/
#define PM_NUM_MODES (4)
#define PM_NUM_MODES (5)
/** @} */

/**
Expand Down
2 changes: 1 addition & 1 deletion cpu/cc2538/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ typedef uint32_t gpio_t;
* @name Power mode configuration
* @{
*/
#define PM_NUM_MODES (4)
#define PM_NUM_MODES (5)
/** @} */

/**
Expand Down
2 changes: 1 addition & 1 deletion cpu/efm32/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ typedef struct {
/**
* @brief Number of usable power modes.
*/
#define PM_NUM_MODES (2U)
#define PM_NUM_MODES (3U)

/**
* @name Watchdog timer (WDT) configuration
Expand Down
2 changes: 1 addition & 1 deletion cpu/esp32/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern "C" {
/**
* @brief Number of usable low power modes
*/
#define PM_NUM_MODES (2U)
#define PM_NUM_MODES (3U)

/**
* @name Power modes
Expand Down
2 changes: 1 addition & 1 deletion cpu/kinetis/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ typedef uint32_t spi_cs_t;
* @name Kinetis power mode configuration
* @{
*/
#define PM_NUM_MODES (3U)
#define PM_NUM_MODES (4U)
enum {
KINETIS_PM_LLS = 0,
KINETIS_PM_VLPS = 1,
Expand Down
2 changes: 1 addition & 1 deletion cpu/lpc1768/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ typedef enum {
/**
* @brief Power management configuration
*/
#define PM_NUM_MODES (2U)
#define PM_NUM_MODES (3U)

/**
* @brief UART device configuration
Expand Down
2 changes: 1 addition & 1 deletion cpu/lpc23xx/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern "C" {
* @name Power mode configuration
* @{
*/
#define PM_NUM_MODES (3)
#define PM_NUM_MODES (4)
/** @} */

/**
Expand Down
2 changes: 1 addition & 1 deletion cpu/samd21/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
* @name Power mode configuration
* @{
*/
#define PM_NUM_MODES (3)
#define PM_NUM_MODES (4)
/** @} */

/**
Expand Down
2 changes: 1 addition & 1 deletion cpu/saml1x/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" {
* @name Power mode configuration
* @{
*/
#define PM_NUM_MODES (1)
#define PM_NUM_MODES (2)
/** @} */

/**
Expand Down
2 changes: 1 addition & 1 deletion cpu/saml21/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern "C" {
* @name Power mode configuration
* @{
*/
#define PM_NUM_MODES (2)
#define PM_NUM_MODES (3)
/** @} */

/**
Expand Down
7 changes: 4 additions & 3 deletions cpu/stm32/include/periph/cpu_pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ extern "C" {
/**
* @brief Number of usable low power modes
*/
#define PM_NUM_MODES (2U)
#define PM_NUM_MODES (3U)

/**
* @name Power modes
* @{
*/
#define STM32_PM_STOP (1U) /**< Index of STOP mode */
#define STM32_PM_STANDBY (0U) /**< Index of STANDBY mode */
#define STM32_PM_IDLE (2U) /**< Index of IDLE mode */
#define STM32_PM_STOP (1U) /**< Index of STOP mode */
#define STM32_PM_STANDBY (0U) /**< Index of STANDBY mode */
/** @} */

#ifndef PM_EWUP_CONFIG
Expand Down