mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #5042 from DipSwitch/pr/fix_stm32_exti_clear_pending
cpu/stm32/gpio_exti: EXTI->PR is of type RW_w1 so don't RMW the pending status register
This commit is contained in:
commit
83c5424551
@ -207,7 +207,7 @@ void isr_exti(void)
|
|||||||
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
|
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
|
||||||
for (int i = 0; i < EXTI_NUMOF; i++) {
|
for (int i = 0; i < EXTI_NUMOF; i++) {
|
||||||
if (pending_isr & (1 << i)) {
|
if (pending_isr & (1 << i)) {
|
||||||
EXTI->PR |= (1 << i); /* clear by writing a 1 */
|
EXTI->PR = (1 << i); /* clear by writing a 1 */
|
||||||
exti_chan[i].cb(exti_chan[i].arg);
|
exti_chan[i].cb(exti_chan[i].arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ void isr_exti(void)
|
|||||||
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
|
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
|
||||||
for (unsigned i = 0; i < GPIO_ISR_CHAN_NUMOF; i++) {
|
for (unsigned i = 0; i < GPIO_ISR_CHAN_NUMOF; i++) {
|
||||||
if (pending_isr & (1 << i)) {
|
if (pending_isr & (1 << i)) {
|
||||||
EXTI->PR |= (1 << i); /* clear by writing a 1 */
|
EXTI->PR = (1 << i); /* clear by writing a 1 */
|
||||||
exti_chan[i].cb(exti_chan[i].arg);
|
exti_chan[i].cb(exti_chan[i].arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ void isr_exti(void)
|
|||||||
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
|
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
|
||||||
for (int i = 0; i < GPIO_ISR_CHAN_NUMOF; i++) {
|
for (int i = 0; i < GPIO_ISR_CHAN_NUMOF; i++) {
|
||||||
if (pending_isr & (1 << i)) {
|
if (pending_isr & (1 << i)) {
|
||||||
EXTI->PR |= (1 << i); /* clear by writing a 1 */
|
EXTI->PR = (1 << i); /* clear by writing a 1 */
|
||||||
exti_chan[i].cb(exti_chan[i].arg);
|
exti_chan[i].cb(exti_chan[i].arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user