cpu/atmega_common/periph: Fixed bug in PCINT
The bank index and the pin number are not necessarily identical. For all PCINT banks except for bank 3 bank_idx was used therefore. It was likely just forgotten to update that for bank 3 as well.
This commit is contained in:
parent
a9bf69146b
commit
a45066551b
@ -301,7 +301,7 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
|
|||||||
#endif /* PCINT2_IDX */
|
#endif /* PCINT2_IDX */
|
||||||
#ifdef PCINT3_IDX
|
#ifdef PCINT3_IDX
|
||||||
case PCINT3_IDX:
|
case PCINT3_IDX:
|
||||||
PCMSK3 |= (1 << pin_num);
|
PCMSK3 |= (1 << bank_idx);
|
||||||
PCICR |= (1 << PCIE3);
|
PCICR |= (1 << PCIE3);
|
||||||
break;
|
break;
|
||||||
#endif /* PCINT3_IDX */
|
#endif /* PCINT3_IDX */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user