STM32L4 PWR: Fix reversed parameters in putreg32()

This commit is contained in:
Dave 2016-03-29 07:19:00 -06:00 committed by Gregory Nutt
parent 8fdef878ba
commit f9c2f70b36

View File

@ -105,14 +105,14 @@ bool stm32l4_pwr_enableclk(bool enable)
/* Disable power interface clock */
regval &= ~RCC_APB1ENR1_PWREN;
putreg32(STM32L4_RCC_APB1ENR1, regval);
putreg32(regval, STM32L4_RCC_APB1ENR1);
}
else if (!wasenabled && enable)
{
/* Enable power interface clock */
regval |= RCC_APB1ENR1_PWREN;
putreg32(STM32L4_RCC_APB1ENR1, regval);
putreg32(regval, STM32L4_RCC_APB1ENR1);
}
return wasenabled;