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:
commit
9f9ecca95e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user