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

Koen Zandberg notifications at github.com
Thu Mar 28 22:27:19 CET 2019


bergzand commented on this pull request.



> +static int _req_descriptor(usbus_t *usbus, usb_setup_t *pkt)
+{
+    uint8_t type = pkt->value >> 8;
+    uint8_t idx = (uint8_t)pkt->value;
+
+    /* Decode descriptor type */
+    switch (type) {
+        case USB_TYPE_DESCRIPTOR_DEVICE:
+            return _req_dev(usbus);
+        case USB_TYPE_DESCRIPTOR_CONFIGURATION:
+            return _req_config(usbus);
+        case USB_TYPE_DESCRIPTOR_STRING:
+            return _req_str(usbus, idx);
+        case USB_TYPE_DESCRIPTOR_DEV_QUALIFIER:
+            return _req_dev_qualifier(usbus);
+        default:

I think I got them all, but feel free to point out if I missed some

-- 
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_r270205849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190328/6bd64303/attachment-0001.html>


More information about the notifications mailing list