1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

Merge pull request #9340 from Josar/fix_gpio

atmega_common/gpio.c: Fixes GPIO_LOW interrupt
This commit is contained in:
ZetaR60 2018-06-21 14:08:52 -04:00 committed by GitHub
commit 7b8e3cbd01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,10 +174,12 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
/* apply flank to interrupt number int_num */
if (int_num < 4) {
EICRA &= ~(0x3 << (int_num * 2));
EICRA |= (flank << (int_num * 2));
}
#if defined(EICRB)
else {
EICRB &= ~(0x3 << ((int_num % 4) * 2));
EICRB |= (flank << ((int_num % 4) * 2));
}
#endif