summaryrefslogtreecommitdiff
path: root/chip/stm32/clock-stm32f0.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/clock-stm32f0.c')
-rw-r--r--chip/stm32/clock-stm32f0.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c
index 26188d97fd..24da104c3d 100644
--- a/chip/stm32/clock-stm32f0.c
+++ b/chip/stm32/clock-stm32f0.c
@@ -113,11 +113,11 @@ void config_hispeed_clock(void)
{
#ifdef CHIP_FAMILY_STM32F3
/* Ensure that HSE is ON */
- if (!(STM32_RCC_CR & (1 << 17))) {
+ if (!(STM32_RCC_CR & BIT(17))) {
/* Enable HSE */
- STM32_RCC_CR |= 1 << 16;
+ STM32_RCC_CR |= BIT(16);
/* Wait for HSE to be ready */
- while (!(STM32_RCC_CR & (1 << 17)))
+ while (!(STM32_RCC_CR & BIT(17)))
;
}
@@ -186,11 +186,11 @@ defined(CHIP_VARIANT_STM32F070)
;
#else
/* Ensure that HSI48 is ON */
- if (!(STM32_RCC_CR2 & (1 << 17))) {
+ if (!(STM32_RCC_CR2 & BIT(17))) {
/* Enable HSI */
- STM32_RCC_CR2 |= 1 << 16;
+ STM32_RCC_CR2 |= BIT(16);
/* Wait for HSI to be ready */
- while (!(STM32_RCC_CR2 & (1 << 17)))
+ while (!(STM32_RCC_CR2 & BIT(17)))
;
}