[riot-notifications] [RIOT-OS/RIOT] [WIP] cpu/atmega_common: pin change interrupt implementation (#11114)

Robert Hartung notifications at github.com
Wed Mar 6 09:47:55 CET 2019

### Contribution description

This is a new proposal of a low-memory footprint implementation for pin change interrupts on atmega platforms. First, a lookup-table is used to indicate if a PCINT is configured for a port (`pcint_lookup`).

Each board then defines a list of GPIOs via `AVR_PCINT_GPIO_LIST` that should be used as pin change interrupts. These are put into a map `pcint_mapping` `(i -> gpio_t)`. When initializing a port pin, and it is not an external interrupt, it is checked if the GPIO was enabled before via AVR_PCINT_GPIO_LIST. Afterwards, the interrupt is enabled on that port and the state and config are saved.
Using a pre-defined list of available pin change interrupts for a board, the memory overhead is kept low.

### Issues/PRs references

See also #7610, #8993, #9159

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/atmega_common: pin change interrupt implementation.
  * fixup
  * fixup

-- File Changes --

    M cpu/atmega_common/periph/gpio.c (171)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190306/793a7e57/attachment-0001.html>

More information about the notifications mailing list