diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-27 08:00:47 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-27 08:00:47 +0000 |
commit | 50a472715f2b38c45f0d8ec11b5957ee80737eef (patch) | |
tree | 548e62bb54df0476bc407654c1ca4a93305b5381 /os | |
parent | a6eed37d26ba0ca617e8e1f3b3eca31449a26fdb (diff) | |
download | ChibiOS-50a472715f2b38c45f0d8ec11b5957ee80737eef.tar.gz ChibiOS-50a472715f2b38c45f0d8ec11b5957ee80737eef.tar.bz2 ChibiOS-50a472715f2b38c45f0d8ec11b5957ee80737eef.zip |
Fixed bug #711.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8952 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/STM32/STM32F0xx/ext_lld_isr.c | 27 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F1xx/ext_lld_isr.c | 38 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F37x/ext_lld_isr.c | 43 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F3xx/ext_lld_isr.c | 49 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F4xx/ext_lld_isr.c | 46 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F7xx/ext_lld_isr.c | 46 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L0xx/ext_lld_isr.c | 22 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L1xx/ext_lld_isr.c | 51 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L4xx/ext_lld_isr.c | 40 |
9 files changed, 238 insertions, 124 deletions
diff --git a/os/hal/ports/STM32/STM32F0xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32F0xx/ext_lld_isr.c index 15295cbbe..3b9dfbc13 100644 --- a/os/hal/ports/STM32/STM32F0xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32F0xx/ext_lld_isr.c @@ -58,7 +58,8 @@ OSAL_IRQ_HANDLER(Vector54) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & ((1U << 0) | (1U << 1));
+ pr = EXTI->PR;
+ pr &= ((1U << 0) | (1U << 1));
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -78,7 +79,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & ((1U << 2) | (1U << 3));
+ pr = EXTI->PR;
+ pr &= ((1U << 2) | (1U << 3));
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -98,9 +100,10 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & ((1U << 4) | (1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
- (1U << 9) | (1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
- (1U << 14) | (1U << 15));
+ pr = EXTI->PR;
+ pr &= ((1U << 4) | (1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
+ (1U << 9) | (1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
+ (1U << 14) | (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -137,11 +140,15 @@ OSAL_IRQ_HANDLER(Vector5C) { * @isr
*/
OSAL_IRQ_HANDLER(Vector44) {
+ uint32_t pr;
OSAL_IRQ_PROLOGUE();
- EXTI->PR = (1U << 16);
- EXTD1.config->channels[16].cb(&EXTD1, 16);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 16);
+ EXTI->PR = pr;
+ if (pr & (1U << 16))
+ EXTD1.config->channels[16].cb(&EXTD1, 16);
OSAL_IRQ_EPILOGUE();
}
@@ -158,7 +165,8 @@ OSAL_IRQ_HANDLER(Vector48) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 17) | (1U << 19) | (1U << 20));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 17) | (1U << 19) | (1U << 20));
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -190,7 +198,8 @@ OSAL_IRQ_HANDLER(Vector70) { {
uint32_t pr;
- pr = EXTI->PR & EXTI->IMR & ((1U << 21) | (1U << 22));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 21) | (1U << 22));
EXTI->PR = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
diff --git a/os/hal/ports/STM32/STM32F1xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32F1xx/ext_lld_isr.c index 5319b9f2c..59bda0f9c 100644 --- a/os/hal/ports/STM32/STM32F1xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32F1xx/ext_lld_isr.c @@ -58,7 +58,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 0);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 0);
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -76,7 +77,8 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 1);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 1);
EXTI->PR = pr;
if (pr & (1U << 1))
EXTD1.config->channels[1].cb(&EXTD1, 1);
@@ -94,7 +96,8 @@ OSAL_IRQ_HANDLER(Vector60) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 2);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 2);
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -112,7 +115,8 @@ OSAL_IRQ_HANDLER(Vector64) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 3);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 3);
EXTI->PR = pr;
if (pr & (1U << 3))
EXTD1.config->channels[3].cb(&EXTD1, 3);
@@ -130,7 +134,8 @@ OSAL_IRQ_HANDLER(Vector68) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 4);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 4);
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -148,7 +153,8 @@ OSAL_IRQ_HANDLER(Vector9C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) | (1U << 9));
+ pr = EXTI->PR;
+ pr &= ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) | (1U << 9));
EXTI->PR = pr;
if (pr & (1U << 5))
EXTD1.config->channels[5].cb(&EXTD1, 5);
@@ -174,8 +180,9 @@ OSAL_IRQ_HANDLER(VectorE0) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) | (1U << 14) |
- (1U << 15));
+ pr = EXTI->PR;
+ pr &= ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) | (1U << 14) |
+ (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 10))
EXTD1.config->channels[10].cb(&EXTD1, 10);
@@ -203,7 +210,8 @@ OSAL_IRQ_HANDLER(Veector44) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 16);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 16);
EXTI->PR = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -221,7 +229,8 @@ OSAL_IRQ_HANDLER(VectorE4) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 17);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 17);
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -240,7 +249,8 @@ OSAL_IRQ_HANDLER(VectorE8) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 18);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 18);
EXTI->PR = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
@@ -258,7 +268,8 @@ OSAL_IRQ_HANDLER(Vector138) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 19);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 19);
EXTI->PR = pr;
if (pr & (1U << 19))
EXTD1.config->channels[19].cb(&EXTD1, 19);
@@ -278,7 +289,8 @@ OSAL_IRQ_HANDLER(VectorE8) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 18);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 18);
EXTI->PR = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
diff --git a/os/hal/ports/STM32/STM32F37x/ext_lld_isr.c b/os/hal/ports/STM32/STM32F37x/ext_lld_isr.c index df8ef9e4f..c4846abdf 100644 --- a/os/hal/ports/STM32/STM32F37x/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32F37x/ext_lld_isr.c @@ -59,7 +59,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 0);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 0);
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -79,7 +80,8 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 1);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 1);
EXTI->PR = pr;
if (pr & (1U << 1))
EXTD1.config->channels[1].cb(&EXTD1, 1);
@@ -99,7 +101,8 @@ OSAL_IRQ_HANDLER(Vector60) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 2);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 2);
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -119,7 +122,8 @@ OSAL_IRQ_HANDLER(Vector64) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 3);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 3);
EXTI->PR = pr;
if (pr & (1U << 3))
EXTD1.config->channels[3].cb(&EXTD1, 3);
@@ -139,7 +143,8 @@ OSAL_IRQ_HANDLER(Vector68) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 4);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 4);
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -159,8 +164,9 @@ OSAL_IRQ_HANDLER(Vector9C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
- (1U << 9));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
+ (1U << 9));
EXTI->PR = pr;
if (pr & (1U << 5))
EXTD1.config->channels[5].cb(&EXTD1, 5);
@@ -188,8 +194,9 @@ OSAL_IRQ_HANDLER(VectorE0) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
- (1U << 14) | (1U << 15));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
+ (1U << 14) | (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 10))
EXTD1.config->channels[10].cb(&EXTD1, 10);
@@ -219,7 +226,8 @@ OSAL_IRQ_HANDLER(Vector44) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 16);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 16);
EXTI->PR = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -239,7 +247,8 @@ OSAL_IRQ_HANDLER(VectorE4) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 17);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 17);
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -259,7 +268,8 @@ OSAL_IRQ_HANDLER(Vector170) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 18);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 18);
EXTI->PR = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
@@ -279,7 +289,8 @@ OSAL_IRQ_HANDLER(Vector48) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 19);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 19);
EXTI->PR = pr;
if (pr & (1U << 19))
EXTD1.config->channels[19].cb(&EXTD1, 19);
@@ -299,7 +310,8 @@ OSAL_IRQ_HANDLER(Vector4C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 20);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 20);
EXTI->PR = pr;
if (pr & (1U << 20))
EXTD1.config->channels[20].cb(&EXTD1, 20);
@@ -319,7 +331,8 @@ OSAL_IRQ_HANDLER(Vector140) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 21) | (1U << 22));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 21) | (1U << 22));
EXTI->PR = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
diff --git a/os/hal/ports/STM32/STM32F3xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32F3xx/ext_lld_isr.c index 47b717b79..ee6f71b71 100644 --- a/os/hal/ports/STM32/STM32F3xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32F3xx/ext_lld_isr.c @@ -59,7 +59,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 0);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 0);
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -79,7 +80,8 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 1);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 1);
EXTI->PR = pr;
if (pr & (1U << 1))
EXTD1.config->channels[1].cb(&EXTD1, 1);
@@ -99,7 +101,8 @@ OSAL_IRQ_HANDLER(Vector60) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 2);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 2);
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -119,7 +122,8 @@ OSAL_IRQ_HANDLER(Vector64) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 3);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 3);
EXTI->PR = pr;
if (pr & (1U << 3))
EXTD1.config->channels[3].cb(&EXTD1, 3);
@@ -139,7 +143,8 @@ OSAL_IRQ_HANDLER(Vector68) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 4);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 4);
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -159,8 +164,9 @@ OSAL_IRQ_HANDLER(Vector9C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
- (1U << 9));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
+ (1U << 9));
EXTI->PR = pr;
if (pr & (1U << 5))
EXTD1.config->channels[5].cb(&EXTD1, 5);
@@ -188,8 +194,9 @@ OSAL_IRQ_HANDLER(VectorE0) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
- (1U << 14) | (1U << 15));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
+ (1U << 14) | (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 10))
EXTD1.config->channels[10].cb(&EXTD1, 10);
@@ -219,7 +226,8 @@ OSAL_IRQ_HANDLER(Vector44) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 16);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 16);
EXTI->PR = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -239,7 +247,8 @@ OSAL_IRQ_HANDLER(VectorE4) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 17);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 17);
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -259,7 +268,8 @@ OSAL_IRQ_HANDLER(VectorE8) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 18);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 18);
EXTI->PR = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
@@ -279,7 +289,8 @@ OSAL_IRQ_HANDLER(Vector48) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 19);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 19);
EXTI->PR = pr;
if (pr & (1U << 19))
EXTD1.config->channels[19].cb(&EXTD1, 19);
@@ -299,7 +310,8 @@ OSAL_IRQ_HANDLER(Vector4C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 20);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 20);
EXTI->PR = pr;
if (pr & (1U << 20))
EXTD1.config->channels[20].cb(&EXTD1, 20);
@@ -319,7 +331,8 @@ OSAL_IRQ_HANDLER(Vector140) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 21) | (1U << 22) | (1U << 29));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 21) | (1U << 22) | (1U << 29));
EXTI->PR = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
@@ -343,7 +356,8 @@ OSAL_IRQ_HANDLER(Vector144) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 30) | (1U << 31));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 30) | (1U << 31));
EXTI->PR = pr;
if (pr & (1U << 30))
EXTD1.config->channels[30].cb(&EXTD1, 30);
@@ -370,7 +384,8 @@ OSAL_IRQ_HANDLER(Vector148) { OSAL_IRQ_PROLOGUE();
- pr2 = EXTI->PR2 & EXTI->IMR & (1U << 1);
+ pr2 = EXTI->PR2;
+ pr2 = EXTI->IMR & (1U << 1);
EXTI->PR2 = pr2;
if (pr2 & (1U << 1))
EXTD1.config->channels[33].cb(&EXTD1, 33);
diff --git a/os/hal/ports/STM32/STM32F4xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32F4xx/ext_lld_isr.c index 7fb4d76ce..475d85c3c 100644 --- a/os/hal/ports/STM32/STM32F4xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32F4xx/ext_lld_isr.c @@ -58,7 +58,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 0);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 0);
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -76,7 +77,8 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 1);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 1);
EXTI->PR = pr;
if (pr & (1U << 1))
EXTD1.config->channels[1].cb(&EXTD1, 1);
@@ -94,7 +96,8 @@ OSAL_IRQ_HANDLER(Vector60) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 2);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 2);
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -112,7 +115,8 @@ OSAL_IRQ_HANDLER(Vector64) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 3);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 3);
EXTI->PR = pr;
if (pr & (1U << 3))
EXTD1.config->channels[3].cb(&EXTD1, 3);
@@ -130,7 +134,8 @@ OSAL_IRQ_HANDLER(Vector68) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 4);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 4);
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -148,8 +153,9 @@ OSAL_IRQ_HANDLER(Vector9C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
- (1U << 9));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
+ (1U << 9));
EXTI->PR = pr;
if (pr & (1U << 5))
EXTD1.config->channels[5].cb(&EXTD1, 5);
@@ -175,8 +181,9 @@ OSAL_IRQ_HANDLER(VectorE0) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
- (1U << 14) | (1U << 15));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
+ (1U << 14) | (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 10))
EXTD1.config->channels[10].cb(&EXTD1, 10);
@@ -204,7 +211,8 @@ OSAL_IRQ_HANDLER(Vector44) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 16);
+ pr = EXTI->PR;
+ pr = EXTI->IMR & (1U << 16);
EXTI->PR = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -222,7 +230,8 @@ OSAL_IRQ_HANDLER(VectorE4) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 17);
+ pr = EXTI->PR;
+ pr = EXTI->IMR & (1U << 17);
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -240,7 +249,8 @@ OSAL_IRQ_HANDLER(VectorE8) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 18);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 18);
EXTI->PR = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
@@ -259,7 +269,8 @@ OSAL_IRQ_HANDLER(Vector138) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 19);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 19);
EXTI->PR = pr;
if (pr & (1U << 19))
EXTD1.config->channels[19].cb(&EXTD1, 19);
@@ -279,7 +290,8 @@ OSAL_IRQ_HANDLER(Vector170) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 20);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 20);
EXTI->PR = pr;
if (pr & (1U << 20))
EXTD1.config->channels[20].cb(&EXTD1, 20);
@@ -299,7 +311,8 @@ OSAL_IRQ_HANDLER(Vector48) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 21);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 21);
EXTI->PR = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
@@ -318,7 +331,8 @@ OSAL_IRQ_HANDLER(Vector4C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 22);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 22);
EXTI->PR = pr;
if (pr & (1U << 22))
EXTD1.config->channels[22].cb(&EXTD1, 22);
diff --git a/os/hal/ports/STM32/STM32F7xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32F7xx/ext_lld_isr.c index cf4ae009a..98ff53f03 100644 --- a/os/hal/ports/STM32/STM32F7xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32F7xx/ext_lld_isr.c @@ -58,7 +58,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 0);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 0);
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -76,7 +77,8 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 1);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 1);
EXTI->PR = pr;
if (pr & (1U << 1))
EXTD1.config->channels[1].cb(&EXTD1, 1);
@@ -94,7 +96,8 @@ OSAL_IRQ_HANDLER(Vector60) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 2);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 2);
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -112,7 +115,8 @@ OSAL_IRQ_HANDLER(Vector64) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 3);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 3);
EXTI->PR = pr;
if (pr & (1U << 3))
EXTD1.config->channels[3].cb(&EXTD1, 3);
@@ -130,7 +134,8 @@ OSAL_IRQ_HANDLER(Vector68) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 4);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 4);
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -148,8 +153,9 @@ OSAL_IRQ_HANDLER(Vector9C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
- (1U << 9));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
+ (1U << 9));
EXTI->PR = pr;
if (pr & (1U << 5))
EXTD1.config->channels[5].cb(&EXTD1, 5);
@@ -175,8 +181,9 @@ OSAL_IRQ_HANDLER(VectorE0) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
- (1U << 14) | (1U << 15));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
+ (1U << 14) | (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 10))
EXTD1.config->channels[10].cb(&EXTD1, 10);
@@ -204,7 +211,8 @@ OSAL_IRQ_HANDLER(Vector44) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 16);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 16);
EXTI->PR = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -222,7 +230,8 @@ OSAL_IRQ_HANDLER(VectorE4) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 17);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 17);
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -240,7 +249,8 @@ OSAL_IRQ_HANDLER(VectorE8) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 18);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 18);
EXTI->PR = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
@@ -258,7 +268,8 @@ OSAL_IRQ_HANDLER(Vector138) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 19);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 19);
EXTI->PR = pr;
if (pr & (1U << 19))
EXTD1.config->channels[19].cb(&EXTD1, 19);
@@ -276,7 +287,8 @@ OSAL_IRQ_HANDLER(Vector170) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 20);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 20);
EXTI->PR = pr;
if (pr & (1U << 20))
EXTD1.config->channels[20].cb(&EXTD1, 20);
@@ -294,7 +306,8 @@ OSAL_IRQ_HANDLER(Vector48) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 21);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 21);
EXTI->PR = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
@@ -312,7 +325,8 @@ OSAL_IRQ_HANDLER(Vector4C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 22);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 22);
EXTI->PR = pr;
if (pr & (1U << 22))
EXTD1.config->channels[22].cb(&EXTD1, 22);
diff --git a/os/hal/ports/STM32/STM32L0xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32L0xx/ext_lld_isr.c index 9818ea0fd..8db3f763b 100644 --- a/os/hal/ports/STM32/STM32L0xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32L0xx/ext_lld_isr.c @@ -59,7 +59,8 @@ OSAL_IRQ_HANDLER(STM32_EXTI_LINE01_HANDLER) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 0) | (1U << 1));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 0) | (1U << 1));
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -81,7 +82,8 @@ OSAL_IRQ_HANDLER(STM32_EXTI_LINE23_HANDLER) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 2) | (1U << 3));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 2) | (1U << 3));
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -103,9 +105,10 @@ OSAL_IRQ_HANDLER(STM32_EXTI_LINE4_15_HANDLER) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 4) | (1U << 5) | (1U << 6) | (1U << 7) |
- (1U << 8) | (1U << 9) | (1U << 10) | (1U << 11) |
- (1U << 12) | (1U << 13) | (1U << 14) | (1U << 15));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 4) | (1U << 5) | (1U << 6) | (1U << 7) |
+ (1U << 8) | (1U << 9) | (1U << 10) | (1U << 11) |
+ (1U << 12) | (1U << 13) | (1U << 14) | (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -147,7 +150,8 @@ OSAL_IRQ_HANDLER(STM32_EXTI_LINE16_HANDLER) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 16);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 16);
EXTI->PR = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -167,7 +171,8 @@ OSAL_IRQ_HANDLER(STM32_EXTI_LINE171920_HANDLER) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 17) | (1U << 19) | (1U << 20));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 17) | (1U << 19) | (1U << 20));
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -198,7 +203,8 @@ OSAL_IRQ_HANDLER(STM32_EXTI_LINE2122_HANDLER) { {
uint32_t pr;
- pr = EXTI->PR & EXTI->IMR & ((1U << 21) | (1U << 22));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 21) | (1U << 22));
EXTI->PR = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
diff --git a/os/hal/ports/STM32/STM32L1xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32L1xx/ext_lld_isr.c index f457bacfd..fcf7959e2 100644 --- a/os/hal/ports/STM32/STM32L1xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32L1xx/ext_lld_isr.c @@ -58,7 +58,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 0);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 0);
EXTI->PR = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -76,7 +77,8 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 1);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 1);
EXTI->PR = pr;
if (pr & (1U << 1))
EXTD1.config->channels[1].cb(&EXTD1, 1);
@@ -94,7 +96,8 @@ OSAL_IRQ_HANDLER(Vector60) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 2);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 2);
EXTI->PR = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -112,7 +115,8 @@ OSAL_IRQ_HANDLER(Vector64) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 3);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 3);
EXTI->PR = pr;
if (pr & (1U << 3))
EXTD1.config->channels[3].cb(&EXTD1, 3);
@@ -130,7 +134,8 @@ OSAL_IRQ_HANDLER(Vector68) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 4);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 4);
EXTI->PR = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -148,8 +153,9 @@ OSAL_IRQ_HANDLER(Vector9C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
- (1U << 9));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
+ (1U << 9));
EXTI->PR = pr;
if (pr & (1U << 5))
EXTD1.config->channels[5].cb(&EXTD1, 5);
@@ -175,8 +181,9 @@ OSAL_IRQ_HANDLER(VectorE0) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
- (1U << 14) | (1U << 15));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
+ (1U << 14) | (1U << 15));
EXTI->PR = pr;
if (pr & (1U << 10))
EXTD1.config->channels[10].cb(&EXTD1, 10);
@@ -204,7 +211,8 @@ OSAL_IRQ_HANDLER(Vector44) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 16);
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 16);
EXTI->PR = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -221,7 +229,9 @@ OSAL_IRQ_HANDLER(VectorE4) { uint32_t pr;
OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 17);
+
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 17);
EXTI->PR = pr;
if (pr & (1U << 17))
EXTD1.config->channels[17].cb(&EXTD1, 17);
@@ -237,7 +247,9 @@ OSAL_IRQ_HANDLER(VectorE8) { uint32_t pr;
OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 18);
+
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 18);
EXTI->PR = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
@@ -254,7 +266,9 @@ OSAL_IRQ_HANDLER(Vector48) { uint32_t pr;
OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 19);
+
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 19);
EXTI->PR = pr;
if (pr & (1U << 19))
EXTD1.config->channels[19].cb(&EXTD1, 19);
@@ -271,7 +285,9 @@ OSAL_IRQ_HANDLER(Vector4C) { uint32_t pr;
OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 20);
+
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 20);
EXTI->PR = pr;
if (pr & (1U << 20))
EXTD1.config->channels[20].cb(&EXTD1, 20);
@@ -289,7 +305,8 @@ OSAL_IRQ_HANDLER(Vector98) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & ((1U << 21) | (1U << 22));
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & ((1U << 21) | (1U << 22));
EXTI->PR = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
@@ -309,7 +326,9 @@ OSAL_IRQ_HANDLER(Vector120) { uint32_t pr;
OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR & EXTI->IMR & (1U << 23);
+
+ pr = EXTI->PR;
+ pr &= EXTI->IMR & (1U << 23);
EXTI->PR = pr;
if (pr & (1U << 23))
EXTD1.config->channels[23].cb(&EXTD1, 23);
diff --git a/os/hal/ports/STM32/STM32L4xx/ext_lld_isr.c b/os/hal/ports/STM32/STM32L4xx/ext_lld_isr.c index 32c113e9b..dc4e5f002 100644 --- a/os/hal/ports/STM32/STM32L4xx/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32L4xx/ext_lld_isr.c @@ -58,7 +58,8 @@ OSAL_IRQ_HANDLER(Vector58) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 0);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 0);
EXTI->PR1 = pr;
if (pr & (1U << 0))
EXTD1.config->channels[0].cb(&EXTD1, 0);
@@ -76,7 +77,8 @@ OSAL_IRQ_HANDLER(Vector5C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 1);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 1);
EXTI->PR1 = pr;
if (pr & (1U << 1))
EXTD1.config->channels[1].cb(&EXTD1, 1);
@@ -94,7 +96,8 @@ OSAL_IRQ_HANDLER(Vector60) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 2);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 2);
EXTI->PR1 = pr;
if (pr & (1U << 2))
EXTD1.config->channels[2].cb(&EXTD1, 2);
@@ -112,7 +115,8 @@ OSAL_IRQ_HANDLER(Vector64) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 3);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 3);
EXTI->PR1 = pr;
if (pr & (1U << 3))
EXTD1.config->channels[3].cb(&EXTD1, 3);
@@ -130,7 +134,8 @@ OSAL_IRQ_HANDLER(Vector68) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 4);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 4);
EXTI->PR1 = pr;
if (pr & (1U << 4))
EXTD1.config->channels[4].cb(&EXTD1, 4);
@@ -148,8 +153,9 @@ OSAL_IRQ_HANDLER(Vector9C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
- (1U << 9));
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
+ (1U << 9));
EXTI->PR1 = pr;
if (pr & (1U << 5))
EXTD1.config->channels[5].cb(&EXTD1, 5);
@@ -175,8 +181,9 @@ OSAL_IRQ_HANDLER(VectorE0) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
- (1U << 14) | (1U << 15));
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
+ (1U << 14) | (1U << 15));
EXTI->PR1 = pr;
if (pr & (1U << 10))
EXTD1.config->channels[10].cb(&EXTD1, 10);
@@ -204,7 +211,8 @@ OSAL_IRQ_HANDLER(Vector44) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 16);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 16);
EXTI->PR1 = pr;
if (pr & (1U << 16))
EXTD1.config->channels[16].cb(&EXTD1, 16);
@@ -234,7 +242,8 @@ OSAL_IRQ_HANDLER(VectorE4) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 18);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 18);
EXTI->PR1 = pr;
if (pr & (1U << 18))
EXTD1.config->channels[18].cb(&EXTD1, 18);
@@ -252,7 +261,8 @@ OSAL_IRQ_HANDLER(Vector48) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 19);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 19);
EXTI->PR1 = pr;
if (pr & (1U << 19))
EXTD1.config->channels[19].cb(&EXTD1, 19);
@@ -270,7 +280,8 @@ OSAL_IRQ_HANDLER(Vector4C) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & (1U << 20);
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & (1U << 20);
EXTI->PR1 = pr;
if (pr & (1U << 20))
EXTD1.config->channels[20].cb(&EXTD1, 20);
@@ -288,7 +299,8 @@ OSAL_IRQ_HANDLER(Vector140) { OSAL_IRQ_PROLOGUE();
- pr = EXTI->PR1 & EXTI->IMR1 & ( (1U << 21) | ( 1U << 22 ) );
+ pr = EXTI->PR1;
+ pr &= EXTI->IMR1 & ( (1U << 21) | ( 1U << 22 ) );
EXTI->PR1 = pr;
if (pr & (1U << 21))
EXTD1.config->channels[21].cb(&EXTD1, 21);
|