Skip to content

Commit

Permalink
cpu/stm32: centralize PM_BLOCKER_INITIAL define
Browse files Browse the repository at this point in the history
and make it overridable
  • Loading branch information
aabadie committed Apr 12, 2019
1 parent 364499f commit 61b9652
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
8 changes: 8 additions & 0 deletions cpu/stm32_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ extern "C" {
#define STM32_PM_STANDBY (0U)
/** @} */

#ifndef PM_BLOCKER_INITIAL
/**
* @brief Default initial PM blocker
* @todo All modes are blocked per default, until PM is cleanly implemented
*/
#define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 }
#endif

#ifndef PM_EWUP_CONFIG
/**
* @brief Wake-up pins configuration (CSR register)
Expand Down
6 changes: 0 additions & 6 deletions cpu/stm32f1/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ extern "C" {
*/
#define PM_NUM_MODES (2U)

/**
* @brief Override the default initial PM blocker
* @todo we block all modes per default, until PM is cleanly implemented
*/
#define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 }

/**
* @brief Define the config flag for stop mode
*/
Expand Down
6 changes: 0 additions & 6 deletions cpu/stm32l0/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ typedef struct {
uint8_t chan; /**< internal channel the pin is connected to */
} adc_conf_t;

/**
* @brief Override the default initial PM blocker
* @todo we block all modes per default, until PM is cleanly implemented
*/
#define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 }

/**
* @name EEPROM configuration
* @{
Expand Down

0 comments on commit 61b9652

Please sign in to comment.