[riot-notifications] [RIOT-OS/RIOT] nrf52: Implement EasyDMA-based SPI peripheral implemenation (#14057)

Koen Zandberg notifications at github.com
Tue May 12 12:10:16 CEST 2020


@bergzand commented on this pull request.



> +    if (_len == 1) {
+        _enable_workaround(bus);
+    }
+#endif
+
+    /* Enable IRQ */
+    dev(bus)->INTENSET = SPIM_INTENSET_END_Msk;
+
+    do {
+        size_t transfer_len = len > UINT8_MAX ? UINT8_MAX : len;
+        _transfer(bus, out_buf, in_buf, transfer_len);
+        /* Block until the irq releases the mutex, then lock it again for the
+         * next transfer */
+        mutex_lock(&busy[bus]);
+        out_buf += out_buf ? transfer_len : 0;
+        in_buf += in_buf? transfer_len : 0;

And done

-- 
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/14057#discussion_r423618989
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200512/ed3d0fa3/attachment-0001.htm>


More information about the notifications mailing list