[riot-notifications] [RIOT-OS/RIOT] [WIP] cpu/atmega_common: pseudomodule-based pin change interrupt implementation (#11122)
notifications at github.com
Thu Mar 7 13:47:35 CET 2019
roberthartung commented on this pull request.
> @@ -59,6 +63,88 @@
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)
+#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)
I personally don't like the solution from above. This adds a lot of code specific code to the CPU. In the end, this isn't a problem, because I solved it directly in the code when checking if the bank is enabled: I just check if the mapping exists, if so, the CPU has the bank. Problem solved :)
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...
More information about the notifications