1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #17219 from maribu/cpu/atmega_common

cpu/atmega_common: make cppcheck happy
This commit is contained in:
Alexandre Abadie 2021-11-17 10:10:20 +01:00 committed by GitHub
commit 9f9ecca95e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,16 +337,17 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
EIMSK |= (1 << int_num);
/* 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 {
if (int_num >= 4) {
EICRB &= ~(0x3 << ((int_num % 4) * 2));
EICRB |= (flank << ((int_num % 4) * 2));
}
else
#endif
{
EICRA &= ~(0x3 << (int_num * 2));
EICRA |= (flank << (int_num * 2));
}
/* set callback */
config[int_num].cb = cb;