[riot-notifications] [RIOT-OS/RIOT] Adds the atmega1284p CPU and the first version of the INGA board to RIOT (#7604)

lebrush notifications at github.com
Fri Sep 15 16:34:29 CEST 2017


lebrush commented on this pull request.



> + ** This emulates a software triggered interrupt
+ ***/
+#define AVR_CONTEXT_SWAP_INIT do { \
+            DDRA |= (1 << DDA0); \
+            PCICR |= (1 << PCIE0); \
+            PCMSK0 |= (1 << PCINT0); \
+} while (0)
+#define AVR_CONTEXT_SWAP_INTERRUPT_VECT         PCINT0_vect
+#define AVR_CONTEXT_SWAP_INTERRUPT_VECT_NUM     PCINT0_vect_num
+#define AVR_CONTEXT_SWAP_TRIGGER                PORTA ^= (1 << PA0)
+
+/**
+ * Context swap defines
+ * Setup to use WDT interrupt
+ */
+/*

Mmm I've no strong opinion here... 
Another thing that I just realized about (sorry :-P): Why do you need the `tmp` variable? Does the interrupt trigger after enabling it? And yet another...: you set twice the `WDIE` flag twice in tmp.

```C
MCUSR &= ~(1 << WDRF);\
WDTCSR = (1 << WDCE) | (1 << WDIE) | (1 << WDE);\
WDTCSR = (1 << WDCE) | (1 << WDIE) | (1 << WDE);\ # this isthe second tmp assignment
```

-- 
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/7604#discussion_r139165327
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170915/e514064d/attachment.html>


More information about the notifications mailing list