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

Koen Zandberg notifications at github.com
Mon Feb 11 11:26:05 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)

Should probably also be static

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


More information about the notifications mailing list