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

Koen Zandberg notifications at github.com
Sat Feb 2 13:51:11 CET 2019


bergzand commented on this pull request.



> +        msg_t msg = { .type = USBUS_MSG_TYPE_EVENT,
+                      .content = { .ptr = usbdev } };
+
+        if (msg_send(&msg, usbus->pid) <= 0) {
+            puts("usbus: possibly lost interrupt.");
+        }
+    }
+    else {
+        switch (event) {
+            case USBDEV_EVENT_RESET:
+                {
+                usbus->state = USBUS_STATE_RESET;
+                usbus->addr = 0;
+                usbus->setup_state = USBUS_SETUPRQ_READY;
+                usbus->dev->driver->set(usbus->dev, USBOPT_ADDRESS, &usbus->addr, sizeof(uint8_t));
+                puts("Reset");

Because of lazy probably, sorry :(

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


More information about the notifications mailing list