[riot-notifications] [RIOT-OS/RIOT] USBUS: Initial work towards an USB stack (#10916)

Koen Zandberg notifications at github.com
Thu May 30 20:29:56 CEST 2019


bergzand commented on this pull request.



> +
+    while (1) {
+        thread_flags_t flags = thread_flags_wait_any(
+            USBUS_THREAD_FLAG_USBDEV |
+            USBUS_THREAD_FLAG_USBDEV_EP |
+            THREAD_FLAG_EVENT
+            );
+        if (flags & USBUS_THREAD_FLAG_USBDEV) {
+            usbdev_esr(dev);
+        }
+        if (flags & USBUS_THREAD_FLAG_USBDEV_EP) {
+            uint32_t events = _get_and_reset_ep_events(usbus);
+            while (events) {
+                unsigned num = bitarithm_lsb(events);
+                events &= ~(1 << num);
+                if (num >= 0x10) {

Reworked a bit, should be explained 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/10916#discussion_r289115179
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190530/b4701b71/attachment.html>


More information about the notifications mailing list