[riot-notifications] [RIOT-OS/RIOT] GPIO interrupt fixes for atmega328p (#7590)

lebrush notifications at github.com
Wed Sep 13 09:41:03 CEST 2017

lebrush commented on this pull request.

> @@ -148,43 +148,26 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
     /* clear global interrupt flag */
+#if defined(CPU_ATMEGA328P)
+    /* INT pins start at PD2 instead of at PD0 */
+    pin_num -= 2;
     EIMSK |= (1 << pin_num);

The previous assert already filters anything higher than 3 (line [138](https://github.com/RIOT-OS/RIOT/pull/7590/files/f6b6434cf21a6dc5e9b3904918eba7855361b5ec#diff-460a236bfe2d6795b0baca2b0cd0360fR138)) maybe it's a good idea to add a check the lower bound as well. Will do :+1: 

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/20170913/312b0c25/attachment.html>

More information about the notifications mailing list