[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: RTT and RTC support (#8842)

Marian Buschsieweke notifications at github.com
Tue Mar 5 12:42:44 CET 2019


maribu commented on this pull request.



> +
+ISR(TIMER2_OVF_vect) {
+    __enter_isr();
+
+    rtt_state.ext_cnt++;
+
+    /* Enable RTT alarm if overflowed enough times */
+    if (rtt_state.ext_comp <= rtt_state.ext_cnt) {
+        /* Clear interrupt flag */
+        TIFR2 = (1 << OCF2A);
+
+        /* Enable interrupt */
+        TIMSK2 |= (1 << OCIE2A);
+    }
+
+#if MODULE_PERIPH_RTC

While this seems to work, I would prefer `#ifdef MODULE_PERIPH_RTC`. This would be consistent to the negation of the macro, as

``` C
#ifndef MODULE_PERIPH_RTC
```
will work but
```C
#if !MODULE_PERIPH_RTC
```
will not work. (See this as a suggestion, I will not block the PR on this.)

-- 
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/8842#pullrequestreview-210634872
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190305/104fabff/attachment.html>


More information about the notifications mailing list