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

Koen Zandberg notifications at github.com
Fri Feb 1 23:14:52 CET 2019


bergzand commented on this pull request.



> +                break;
+        }
+    }
+    return NULL;
+}
+
+/* USB event callback */
+void _event_cb(usbdev_t *usbdev, usbdev_event_t event)
+{
+    usbus_t *usbus = (usbus_t *)usbdev->context;
+    if (event == USBDEV_EVENT_ESR) {
+        msg_t msg = { .type = USBUS_MSG_TYPE_EVENT,
+                      .content = { .ptr = usbdev } };
+
+        if (msg_send(&msg, usbus->pid) <= 0) {
+            puts("usbus: possibly lost interrupt.");

This is actually one of the issues where I'd really would like to have some feedback on. I've used messages here because it's what I'm most familiar with from gnrc, but using thread flags or events are both open to suggestions for me.

-- 
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_r253217216
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190201/416ef050/attachment.html>


More information about the notifications mailing list