mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/periph/selftest_shield: fix GPIO IRQ testing
The GPIO IRQ tests had a side-effect that IRQs remained configured after the test case was complete. This caused stray IRQs to trigger on SAM0 MCUs and they consequently (and incorrectly) failed the test.
This commit is contained in:
parent
d1c4b455fb
commit
fd30434921
@ -554,6 +554,9 @@ static bool periph_gpio_irq_test_falling(void)
|
||||
brief_delay();
|
||||
failed |= TEST(atomic_load(&cnt) == 3);
|
||||
|
||||
/* disable IRQ again to not have side effects */
|
||||
gpio_irq_disable(ARDUINO_PIN_3);
|
||||
|
||||
print_result(failed);
|
||||
return failed;
|
||||
}
|
||||
@ -617,6 +620,9 @@ static bool periph_gpio_irq_test_rising(void)
|
||||
brief_delay();
|
||||
failed |= TEST(atomic_load(&cnt) == 3);
|
||||
|
||||
/* disable IRQ again to not have side effects */
|
||||
gpio_irq_disable(ARDUINO_PIN_3);
|
||||
|
||||
print_result(failed);
|
||||
return failed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user