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

Kees Bakker notifications at github.com
Fri Feb 1 22:26:00 CET 2019


keestux commented on this pull request.



> +    USB->DEVICE.CTRLB.reg &= ~USB_DEVICE_CTRLB_DETACH;
+}
+
+void usb_detach(void)
+{
+    /* Datasheet is not clear whether device starts detached */
+    USB->DEVICE.CTRLB.reg |= USB_DEVICE_CTRLB_DETACH;
+}
+
+void isr_usb(void)
+{
+    if (USB->DEVICE.EPINTSMRY.reg) {
+        unsigned ep_num = bitarithm_lsb(USB->DEVICE.EPINTSMRY.reg);
+        UsbDeviceEndpoint *ep_reg = &USB->DEVICE.DeviceEndpoint[ep_num];
+        if (_ep_in_flags_set(ep_reg)) {
+            usbdev_ep_t *ep = &endpoints[_get_ep_num(ep_num, USB_EP_DIR_IN)];

Why not use _get_ep() ?

-- 
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#pullrequestreview-199274523
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190201/b09f43e9/attachment.html>


More information about the notifications mailing list