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

Koen Zandberg notifications at github.com
Thu Mar 28 22:20:38 CET 2019


bergzand commented on this pull request.



> +    DEBUG("usbus_control: Initializing EP0\n");
+    usbus_control_handler_t *ep0_handler = (usbus_control_handler_t *)handler;
+    usbus_handler_set_flag(handler, USBUS_HANDLER_FLAG_RESET);
+    ep0_handler->setup_state = USBUS_SETUPRQ_READY;
+
+    ep0_handler->in = usbdev_new_ep(usbus->dev, USB_EP_TYPE_CONTROL,
+                                    USB_EP_DIR_IN, USBUS_EP0_SIZE);
+    ep0_handler->out = usbdev_new_ep(usbus->dev, USB_EP_TYPE_CONTROL,
+                                     USB_EP_DIR_OUT, USBUS_EP0_SIZE);
+}
+
+static int _handle_tr_complete(usbus_t *usbus,
+                               usbus_control_handler_t *ep0_handler,
+                               usbdev_ep_t *ep)
+{
+    switch (ep0_handler->setup_state) {

added

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


More information about the notifications mailing list