cpu/stm32: remove uneeded pm macro tests

STM32_PM_STOP and STM32_PM_STANDBY are always defined in periph_cpu.h,
Thus it is not needed to test them.

Signed-off-by: Gilles DOFFE <gilles.doffe@savoirfairelinux.com>
This commit is contained in:
Gilles DOFFE 2020-09-28 14:37:49 +02:00
parent 6bac94fb6d
commit 3008574d0e

View File

@ -108,7 +108,7 @@ void pm_set(unsigned mode)
int deep; int deep;
switch (mode) { switch (mode) {
#if defined(STM32_PM_STANDBY) && !defined(CPU_FAM_STM32MP1) #if !defined(CPU_FAM_STM32MP1)
case STM32_PM_STANDBY: case STM32_PM_STANDBY:
PWR_CR_REG &= ~(PM_STOP_CONFIG | PM_STANDBY_CONFIG); PWR_CR_REG &= ~(PM_STOP_CONFIG | PM_STANDBY_CONFIG);
PWR_CR_REG |= PM_STANDBY_CONFIG; PWR_CR_REG |= PM_STANDBY_CONFIG;
@ -131,14 +131,12 @@ void pm_set(unsigned mode)
deep = 1; deep = 1;
break; break;
#endif #endif
#ifdef STM32_PM_STOP
case STM32_PM_STOP: case STM32_PM_STOP:
PWR_CR_REG &= ~(PM_STOP_CONFIG | PM_STANDBY_CONFIG); PWR_CR_REG &= ~(PM_STOP_CONFIG | PM_STANDBY_CONFIG);
PWR_CR_REG |= PM_STOP_CONFIG; PWR_CR_REG |= PM_STOP_CONFIG;
/* Set SLEEPDEEP bit of system control block */ /* Set SLEEPDEEP bit of system control block */
deep = 1; deep = 1;
break; break;
#endif
default: default:
deep = 0; deep = 0;
break; break;