[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: add adc driver (#7227)

Sebastian Meiling notifications at github.com
Fri Sep 1 10:17:23 CEST 2017


smlng commented on this pull request.



> +        PORTC &= ~(1 << line);
+    #elif defined (CPU_ATMEGA2560)
+        if (line < 8) {
+            DDRF &= ~(1 << line);
+            PORTF &= ~(1 << line);
+        }
+        else {
+            DDRK &= ~(1 << (line-8));
+            PORTK &= ~(1 << (line-8));
+        }
+    #elif defined (CPU_ATMEGA1281)
+        DDRF &= ~(1 << line);
+        PORTF &= ~(1 << line);
+    #endif
+
+    /* set clock prescaler to get the maximal possible ADC clock value */

in #7502 its the other way around, in general I'd say the compiler should optimise that out anyway. But to be sure, you could make a size comparison. 

However, I would leave as is for now.

-- 
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/7227#discussion_r136521543
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170901/0554a561/attachment-0001.html>


More information about the notifications mailing list