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

Koen Zandberg notifications at github.com
Wed Feb 13 19:39:34 CET 2019


bergzand commented on this pull request.



> +    mutex_lock(&usbus->lock);
+    for (usbus_interface_t *iface = usbus->iface; iface; iface = iface->next) {
+        if (destination == iface->idx) {
+            iface->handler->driver->event_handler(usbus, iface->handler, USBUS_MSG_TYPE_SETUP_RQ, pkt);
+        }
+    }
+    mutex_unlock(&usbus->lock);
+}
+
+
+static inline size_t usbus_pkt_maxlen(usbus_t *usbus, usb_setup_t *pkt)
+{
+    return pkt->length > usbus->in->len ? usbus->in->len : pkt->length;
+}
+
+void recv_setup(usbus_t *usbus, usbdev_ep_t *ep)

marked almost all these functions as static, please let me know if I missed one

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


More information about the notifications mailing list