Lines Matching full:endpoint

32 /* The endpoint size stored in USB.PCKSIZE.SIZE */
76 /* Handles interrupts on an endpoint */
81 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep]; in usb_sam0_ep_isr() local
82 uint32_t intflag = endpoint->EPINTFLAG.reg; in usb_sam0_ep_isr()
84 endpoint->EPINTFLAG.reg = intflag; in usb_sam0_ep_isr()
124 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[0]; in usb_sam0_isr() local
129 endpoint->EPINTENSET.reg = USB_DEVICE_EPINTENSET_TRCPT0 | in usb_sam0_isr()
136 /* Dispatch the endpoint interrupts */ in usb_sam0_isr()
368 LOG_ERR("invalid endpoint configuration"); in usb_dc_ep_check_cap()
373 LOG_ERR("endpoint index/address too high"); in usb_dc_ep_check_cap()
385 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_configure() local
411 /* Map the endpoint size to native size */ in usb_dc_ep_configure()
444 endpoint->EPCFG.bit.EPTYPE1 = type; in usb_dc_ep_configure()
445 endpoint->EPSTATUSCLR.bit.BK1RDY = 1; in usb_dc_ep_configure()
447 endpoint->EPCFG.bit.EPTYPE0 = type; in usb_dc_ep_configure()
448 endpoint->EPSTATUSCLR.bit.BK0RDY = 1; in usb_dc_ep_configure()
459 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_set_stall() local
462 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_set_stall()
467 endpoint->EPSTATUSSET.bit.STALLRQ1 = 1; in usb_dc_ep_set_stall()
469 endpoint->EPSTATUSSET.bit.STALLRQ0 = 1; in usb_dc_ep_set_stall()
480 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_clear_stall() local
483 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_clear_stall()
488 endpoint->EPSTATUSCLR.bit.STALLRQ1 = 1; in usb_dc_ep_clear_stall()
490 endpoint->EPSTATUSCLR.bit.STALLRQ0 = 1; in usb_dc_ep_clear_stall()
501 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_is_stalled() local
504 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_is_stalled()
514 *stalled = endpoint->EPSTATUS.bit.STALLRQ1; in usb_dc_ep_is_stalled()
516 *stalled = endpoint->EPSTATUS.bit.STALLRQ0; in usb_dc_ep_is_stalled()
522 /* Halt the selected endpoint */
528 /* Flush the selected endpoint */
534 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_flush()
544 /* Enable an endpoint and the endpoint interrupts */
550 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_enable() local
553 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_enable()
558 endpoint->EPSTATUSCLR.bit.BK1RDY = 1; in usb_dc_ep_enable()
560 endpoint->EPSTATUSCLR.bit.BK0RDY = 1; in usb_dc_ep_enable()
563 endpoint->EPINTENSET.reg = USB_DEVICE_EPINTENSET_TRCPT0 | in usb_dc_ep_enable()
570 /* Disable the selected endpoint */
575 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_disable() local
578 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_disable()
582 endpoint->EPINTENCLR.reg = USB_DEVICE_EPINTENCLR_TRCPT0 in usb_dc_ep_disable()
589 /* Write a single payload to the IN buffer on the endpoint */
595 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_write() local
602 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_write()
606 if (endpoint->EPSTATUS.bit.BK1RDY) { in usb_dc_ep_write()
620 endpoint->EPINTFLAG.reg = in usb_dc_ep_write()
622 endpoint->EPSTATUSSET.bit.BK1RDY = 1; in usb_dc_ep_write()
631 /* Read data from an OUT endpoint */
638 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_read_ex() local
646 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_read_ex()
650 if (!endpoint->EPSTATUS.bit.BK0RDY) { in usb_dc_ep_read_ex()
680 endpoint->EPSTATUSCLR.bit.BK0RDY = 1; in usb_dc_ep_read_ex()
706 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_read_continue() local
709 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_read_continue()
713 endpoint->EPSTATUSCLR.bit.BK0RDY = 1; in usb_dc_ep_read_continue()
726 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_set_callback()
742 UsbDeviceEndpoint *endpoint = &regs->DeviceEndpoint[ep_idx]; in usb_dc_ep_mps() local
745 LOG_ERR("endpoint index/address out of range"); in usb_dc_ep_mps()
750 /* if endpoint is not configured, this should return 0 */ in usb_dc_ep_mps()
751 if (endpoint->EPCFG.bit.EPTYPE1 == 0) { in usb_dc_ep_mps()
758 /* if endpoint is not configured, this should return 0 */ in usb_dc_ep_mps()
759 if (endpoint->EPCFG.bit.EPTYPE0 == 0) { in usb_dc_ep_mps()