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

Dylan Laduranty notifications at github.com
Fri Feb 1 21:40:10 CET 2019


dylad 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");

Huh,  maybe something like usbus: event reset
Also why do you use puts() and not the DEBUG() function ?

-- 
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#pullrequestreview-199258401
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190201/5c5f5997/attachment.html>


More information about the notifications mailing list