Browse Source

pm_layerd: fix initial value for PM_BLOCKER_INITIAL

the current value was a debugging left-over and should
actually be 0.
pr/rotary
Hauke Petersen 5 years ago
parent
commit
5c7ed2228d
  1. 16
      cpu/kinetis_common/include/periph_cpu.h
  2. 9
      cpu/sam0_common/include/periph_cpu_common.h
  3. 2
      cpu/samd21/include/periph_cpu.h
  4. 2
      cpu/saml21/include/periph_cpu.h
  5. 6
      cpu/stm32f1/include/periph_cpu.h
  6. 2
      sys/pm_layered/pm.c

16
cpu/kinetis_common/include/periph_cpu.h

@ -88,6 +88,17 @@ typedef uint16_t gpio_t;
#define PERIPH_SPI_NEEDS_TRANSFER_REGS
/** @} */
/**
* @brief define number of usable power modes
*/
#define PM_NUM_MODES (1U)
/**
* @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 }
#ifndef DOXYGEN
/**
* @brief Override GPIO modes
@ -291,11 +302,6 @@ enum {
*/
void gpio_init_port(gpio_t pin, uint32_t pcr);
/**
* @brief define number of usable power modes
*/
#define PM_NUM_MODES (1U)
#ifdef __cplusplus
}
#endif

9
cpu/sam0_common/include/periph_cpu_common.h

@ -59,6 +59,15 @@ typedef uint32_t gpio_t;
*/
#define GPIO_PIN(x, y) (((gpio_t)(&PORT->Group[x])) | y)
/**
* @name Power mode configuration
* @{
*/
#define PM_NUM_MODES (3)
/** @todo we block all modes per default, until PM is cleanly implemented */
#define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 }
/** @} */
#ifndef DOXYGEN
/**
* @brief Override active flank configuration values

2
cpu/samd21/include/periph_cpu.h

@ -111,8 +111,6 @@ static inline int _sercom_id(SercomUsart *sercom)
return ((((uint32_t)sercom) >> 10) & 0x7) - 2;
}
#define PM_NUM_MODES (3)
#ifdef __cplusplus
}
#endif

2
cpu/saml21/include/periph_cpu.h

@ -60,8 +60,6 @@ typedef enum {
/** @} */
#endif /* ndef DOXYGEN */
#define PM_NUM_MODES (3)
#ifdef __cplusplus
}
#endif

6
cpu/stm32f1/include/periph_cpu.h

@ -56,6 +56,12 @@ 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 }
#ifndef DOXYGEN
/**
* @brief Override GPIO mode options

2
sys/pm_layered/pm.c

@ -30,7 +30,7 @@
#endif
#ifndef PM_BLOCKER_INITIAL
#define PM_BLOCKER_INITIAL { .val_u32=0x01010101 }
#define PM_BLOCKER_INITIAL { .val_u32 = 0 }
#endif
/**

Loading…
Cancel
Save