[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: pseudomodule-based pin change interrupt implementation (#11122)

Robert Hartung notifications at github.com
Wed Jul 24 10:47:42 CEST 2019


roberthartung commented on this pull request.



> +#ifndef ATMEGA_PCINT_H
+#define ATMEGA_PCINT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ATMEGA_PCINT_MAP_PCINT0 GPIO_PIN(PORT_B, 0), GPIO_PIN(PORT_B, 1), GPIO_PIN(PORT_B, 2), GPIO_PIN(PORT_B, 3), GPIO_PIN(PORT_B, 4), GPIO_PIN(PORT_B, 5), GPIO_PIN(PORT_B, 6), GPIO_PIN(PORT_B, 7)
+#define ATMEGA_PCINT_MAP_PCINT1 GPIO_PIN(PORT_E, 0), GPIO_PIN(PORT_J, 0), GPIO_PIN(PORT_J, 1), GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF
+#define ATMEGA_PCINT_MAP_PCINT2 GPIO_PIN(PORT_K, 0), GPIO_PIN(PORT_K, 1), GPIO_PIN(PORT_K, 2), GPIO_PIN(PORT_K, 3), GPIO_PIN(PORT_K, 4), GPIO_PIN(PORT_K, 5), GPIO_PIN(PORT_K, 6), GPIO_PIN(PORT_K, 7)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ATMEGA_PCINT_H */

What is the actual conflict here? If the pins are not correct for that board, I think it's totally fine to override the pcint definition. The test should then not setup pcints that are not available. Or better: the test should expect the gpio_init_int() call to fail, if the pin is invalid on the board.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11122#discussion_r306696122
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190724/5555dab0/attachment.htm>


More information about the notifications mailing list