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

Dylan Laduranty notifications at github.com
Sat Feb 9 22:34:04 CET 2019


dylad commented on this pull request.



> +        usbus_ep0_ready(usbus);
+    }
+    else {
+        usb_descriptor_string_t desc;
+        desc.type = USB_TYPE_DESCRIPTOR_STRING;
+        mutex_lock(&usbus->lock);
+        usbus_string_t *str = _get_descriptor(usbus, idx);
+        if (str) {
+            desc.length = sizeof(usb_descriptor_string_t);
+            desc.length += 2*strlen(str->str);
+            usbus_put_bytes(usbus, (uint8_t*)&desc, sizeof(desc));
+            usbus_cpy_str(usbus, str->str);
+            usbus_ep0_ready(usbus);
+        }
+        else {
+            usbus_ep0_ready(usbus);

It is. Some times you just want to notify things without send any data.

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


More information about the notifications mailing list