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

Marian Buschsieweke notifications at github.com
Thu Mar 7 11:28:06 CET 2019


maribu commented on this pull request.



> @@ -59,6 +63,88 @@
 #endif
 
 static gpio_isr_ctx_t config[GPIO_EXT_INT_NUMOF];
+
+/**
+ * @brief detects ammount of possible PCINTs
+ */
+#if defined(MODULE_ATMEGA_PCINT) || defined(MODULE_ATMEGA_PCINT0) || defined(MODULE_ATMEGA_PCINT1) || defined(MODULE_ATMEGA_PCINT2) || defined(MODULE_ATMEGA_PCINT3)
+#include "atmega_pcint.h"
+
+#ifndef ATMEGA_PCINT_MAP_PCINT0
+#error Please define pin change interrupts in atmega_pcint.h
+#endif /* ATMEGA_PCINT_MAP_PCINT0 */
+
+/**
+ * @brief check which pcints should be enabled!
+ */
+#if defined(MODULE_ATMEGA_PCINT) || defined(MODULE_ATMEGA_PCINT0)

Using a makefile you can add all the individual bank modules when `atmega_pcint` is used. Then you do not need to handle that in C code

-- 
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_r263321365
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190307/a6892b55/attachment.html>


More information about the notifications mailing list