aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32F3xx
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-07-07 08:24:50 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-07-07 08:24:50 +0000
commit8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a (patch)
treea3bedabfa260b3d3522ddf6f6daff3465bdec762 /os/hal/ports/STM32/STM32F3xx
parent18f021db303aa9b1d70c4efa1aaa53699118e577 (diff)
downloadChibiOS-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/STM32F3xx')
-rw-r--r--os/hal/ports/STM32/STM32F3xx/stm32_rcc.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/STM32F3xx/stm32_rcc.h b/os/hal/ports/STM32/STM32F3xx/stm32_rcc.h
index cf043bfa1..4db714d80 100644
--- a/os/hal/ports/STM32/STM32F3xx/stm32_rcc.h
+++ b/os/hal/ports/STM32/STM32F3xx/stm32_rcc.h
@@ -61,6 +61,7 @@
*/
#define rccEnableAPB1(mask, lp) { \
RCC->APB1ENR |= (mask); \
+ (void)RCC->APB1ENR; \
}
/**
@@ -72,6 +73,7 @@
*/
#define rccDisableAPB1(mask) { \
RCC->APB1ENR &= ~(mask); \
+ (void)RCC->APB1ENR; \
}
/**
@@ -83,7 +85,8 @@
*/
#define rccResetAPB1(mask) { \
RCC->APB1RSTR |= (mask); \
- RCC->APB1RSTR = 0; \
+ RCC->APB1RSTR &= ~(mask); \
+ (void)RCC->APB1RSTR; \
}
/**
@@ -96,6 +99,7 @@
*/
#define rccEnableAPB2(mask, lp) { \
RCC->APB2ENR |= (mask); \
+ (void)RCC->APB2ENR; \
}
/**
@@ -107,6 +111,7 @@
*/
#define rccDisableAPB2(mask) { \
RCC->APB2ENR &= ~(mask); \
+ (void)RCC->APB2ENR; \
}
/**
@@ -118,7 +123,8 @@
*/
#define rccResetAPB2(mask) { \
RCC->APB2RSTR |= (mask); \
- RCC->APB2RSTR = 0; \
+ RCC->APB2RSTR &= ~(mask); \
+ (void)RCC->APB2RSTR; \
}
/**
@@ -131,6 +137,7 @@
*/
#define rccEnableAHB(mask, lp) { \
RCC->AHBENR |= (mask); \
+ (void)RCC->AHBENR; \
}
/**
@@ -142,6 +149,7 @@
*/
#define rccDisableAHB(mask) { \
RCC->AHBENR &= ~(mask); \
+ (void)RCC->AHBENR; \
}
/**
@@ -153,7 +161,8 @@
*/
#define rccResetAHB(mask) { \
RCC->AHBRSTR |= (mask); \
- RCC->AHBRSTR = 0; \
+ RCC->AHBRSTR &= ~(mask); \
+ (void)RCC->AHBRSTR; \
}
/** @} */