// enableSOF enables or disables start-of-frame (SOF) interrupts on the given
// USB device interface.
enableSOF enables or disables start-of-frame (SOF) interrupts on the given
USB device interface.
// enableSOF enables or disables start - of - frame ( SOF ) interrupts on the given // USB device interface .
func (d *dhw) enableSOF(enable bool, iface uint8) {
	if enable {
		ivm := arm.DisableInterrupts()
		d.sofUsage |= 1 << iface
		if !d.bus.USBINTR.HasBits(nxp.USB_USBINTR_SRE) {
			d.bus.USBSTS.Set(nxp.USB_USBSTS_SRI)
			d.bus.USBINTR.SetBits(nxp.USB_USBINTR_SRE)
		}
		arm.EnableInterrupts(ivm)
		d.timerReboot = 80
	} else {
		d.timerReboot = 0
		d.sofUsage &^= 1 << iface
		if 0 == d.sofUsage {
			d.bus.USBINTR.ClearBits(nxp.USB_USBINTR_SRE)
		}
	}
}
func ( d * dhw ) enableSOF ( enable bool , iface uint8 ) { if enable { ivm := arm . DisableInterrupts ( ) d . sofUsage |= 1 << iface if ! d . bus . USBINTR . HasBits ( nxp . USB_USBINTR_SRE ) { d . bus . USBSTS . Set ( nxp . USB_USBSTS_SRI ) d . bus . USBINTR . SetBits ( nxp . USB_USBINTR_SRE ) } arm . EnableInterrupts ( ivm ) d . timerReboot = 80 } else { d . timerReboot = 0 d . sofUsage &^= 1 << iface if 0 == d . sofUsage { d . bus . USBINTR . ClearBits ( nxp . USB_USBINTR_SRE ) } } }
enableSOF enables or disables start-of-frame (SOF) interrupts on the given
USB device interface.
enableSOF enables or disables start - of - frame ( SOF ) interrupts on the given USB device interface .