diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-07-07 08:24:50 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-07-07 08:24:50 +0000 |
commit | 8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a (patch) | |
tree | a3bedabfa260b3d3522ddf6f6daff3465bdec762 /os/hal/ports/STM32/STM32L1xx | |
parent | 18f021db303aa9b1d70c4efa1aaa53699118e577 (diff) | |
download | ChibiOS-8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a.tar.gz ChibiOS-8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a.tar.bz2 ChibiOS-8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a.zip |
Fixed bug #953.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12131 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/STM32/STM32L1xx')
-rw-r--r-- | os/hal/ports/STM32/STM32L1xx/stm32_rcc.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/STM32L1xx/stm32_rcc.h b/os/hal/ports/STM32/STM32L1xx/stm32_rcc.h index 1c52db0a8..11cbe332c 100644 --- a/os/hal/ports/STM32/STM32L1xx/stm32_rcc.h +++ b/os/hal/ports/STM32/STM32L1xx/stm32_rcc.h @@ -65,6 +65,7 @@ RCC->APB1LPENR |= (mask); \
else \
RCC->APB1LPENR &= ~(mask); \
+ (void)RCC->APB1LPENR; \
}
/**
@@ -76,6 +77,8 @@ */
#define rccDisableAPB1(mask) { \
RCC->APB1ENR &= ~(mask); \
+ RCC->APB1LPENR &= ~(mask); \
+ (void)RCC->APB1LPENR; \
}
/**
@@ -87,7 +90,8 @@ */
#define rccResetAPB1(mask) { \
RCC->APB1RSTR |= (mask); \
- RCC->APB1RSTR = 0; \
+ RCC->APB1RSTR &= ~(mask); \
+ (void)RCC->APB1RSTR; \
}
/**
@@ -104,6 +108,7 @@ RCC->APB2LPENR |= (mask); \
else \
RCC->APB2LPENR &= ~(mask); \
+ (void)RCC->APB2LPENR; \
}
/**
@@ -115,6 +120,8 @@ */
#define rccDisableAPB2(mask) { \
RCC->APB2ENR &= ~(mask); \
+ RCC->APB2LPENR &= ~(mask); \
+ (void)RCC->APB2LPENR; \
}
/**
@@ -126,7 +133,8 @@ */
#define rccResetAPB2(mask) { \
RCC->APB2RSTR |= (mask); \
- RCC->APB2RSTR = 0; \
+ RCC->APB2RSTR &= ~(mask); \
+ (void)RCC->APB2RSTR; \
}
/**
@@ -143,6 +151,7 @@ RCC->AHBLPENR |= (mask); \
else \
RCC->AHBLPENR &= ~(mask); \
+ (void)RCC->AHBLPENR; \
}
/**
@@ -154,6 +163,8 @@ */
#define rccDisableAHB(mask) { \
RCC->AHBENR &= ~(mask); \
+ RCC->AHBLPENR &= ~(mask); \
+ (void)RCC->AHBLPENR; \
}
/**
@@ -165,7 +176,8 @@ */
#define rccResetAHB(mask) { \
RCC->AHBRSTR |= (mask); \
- RCC->AHBRSTR = 0; \
+ RCC->AHBRSTR &= ~(mask); \
+ (void)RCC->AHBRSTR; \
}
/** @} */
|