Lines Matching refs:bit
176 regs->PADCAL.bit.TRANSN = pad_transn; in usb_sam0_load_padcal()
191 regs->PADCAL.bit.TRANSP = pad_transp; in usb_sam0_load_padcal()
206 regs->PADCAL.bit.TRIM = pad_trim; in usb_sam0_load_padcal()
226 MCLK->APBBMASK.bit.USB_ = 1; in usb_dc_attach()
236 PM->APBBMASK.bit.USB_ = 1; in usb_dc_attach()
242 while (GCLK->STATUS.bit.SYNCBUSY) { in usb_dc_attach()
247 regs->CTRLA.bit.SWRST = 1; in usb_dc_attach()
253 regs->QOSCTRL.bit.CQOS = 2; in usb_dc_attach()
254 regs->QOSCTRL.bit.DQOS = 2; in usb_dc_attach()
286 regs->CTRLA.bit.ENABLE = 1; in usb_dc_attach()
288 regs->CTRLB.bit.DETACH = 0; in usb_dc_attach()
323 regs->CTRLB.bit.DETACH = 1; in usb_dc_detach()
338 regs->CTRLA.bit.SWRST = 1; in usb_dc_reset()
431 if (bank->PCKSIZE.bit.SIZE != size || buf == NULL) { in usb_dc_ep_configure()
439 bank->PCKSIZE.bit.SIZE = 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()
467 endpoint->EPSTATUSSET.bit.STALLRQ1 = 1; in usb_dc_ep_set_stall()
469 endpoint->EPSTATUSSET.bit.STALLRQ0 = 1; in usb_dc_ep_set_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()
514 *stalled = endpoint->EPSTATUS.bit.STALLRQ1; in usb_dc_ep_is_stalled()
516 *stalled = endpoint->EPSTATUS.bit.STALLRQ0; in usb_dc_ep_is_stalled()
558 endpoint->EPSTATUSCLR.bit.BK1RDY = 1; in usb_dc_ep_enable()
560 endpoint->EPSTATUSCLR.bit.BK0RDY = 1; in usb_dc_ep_enable()
599 desc->DeviceDescBank[1].PCKSIZE.bit.SIZE]; in usb_dc_ep_write()
606 if (endpoint->EPSTATUS.bit.BK1RDY) { in usb_dc_ep_write()
618 desc->DeviceDescBank[1].PCKSIZE.bit.MULTI_PACKET_SIZE = 0; in usb_dc_ep_write()
619 desc->DeviceDescBank[1].PCKSIZE.bit.BYTE_COUNT = len; in usb_dc_ep_write()
622 endpoint->EPSTATUSSET.bit.BK1RDY = 1; in usb_dc_ep_write()
641 uint32_t bytes = desc->DeviceDescBank[0].PCKSIZE.bit.BYTE_COUNT; 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()
713 endpoint->EPSTATUSCLR.bit.BK0RDY = 1; in usb_dc_ep_read_continue()
751 if (endpoint->EPCFG.bit.EPTYPE1 == 0) { in usb_dc_ep_mps()
756 desc->DeviceDescBank[1].PCKSIZE.bit.SIZE]; in usb_dc_ep_mps()
759 if (endpoint->EPCFG.bit.EPTYPE0 == 0) { in usb_dc_ep_mps()
764 desc->DeviceDescBank[0].PCKSIZE.bit.SIZE]; in usb_dc_ep_mps()