1
0
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:
Marian Buschsieweke 2024-11-19 11:55:22 +01:00
parent d1c4b455fb
commit fd30434921
No known key found for this signature in database
GPG Key ID: 758BD52517F79C41

View File

@ -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;
}