// controlTransmit transmits (Tx, IN) data on control endpoint 0.
controlTransmit transmits (Tx, IN) data on control endpoint 0.
// controlTransmit transmits ( Tx IN ) data on control endpoint 0 .
func (d *dhw) controlTransmit(
	data uintptr, size uint32, notify bool) {
	const (
		rm = uint32(1 << descEndptConfigAttrRxPos)
		tm = uint32(1 << descEndptConfigAttrTxPos)
	)
	cd, ad := d.transferControl()
	if size > 0 {
		cd.next = dhwTransferEOL
		cd.token = (size << 16) | (1 << 7)
		for i := range cd.pointer {
			cd.pointer[i] = data + uintptr(i)*4096
		}
		qt := d.endpointQueueHead(txEndpoint(0))
		qt.transfer.next = cd
		qt.transfer.token = 0
		d.bus.ENDPTPRIME.SetBits(tm)
		for 0 != d.bus.ENDPTPRIME.Get() {
		} 
	}
	ad.next = dhwTransferEOL
	ad.token = 1 << 7 
	if notify {
		ad.token |= 1 << 15
	}
	ad.pointer[0] = 0
	qr := d.endpointQueueHead(rxEndpoint(0))
	qr.transfer.next = ad
	qr.transfer.token = 0
	d.bus.ENDPTCOMPLETE.Set(rm | tm)
	d.bus.ENDPTPRIME.SetBits(rm)
	if notify {
		d.controlMask = rm
	}
	for 0 != d.bus.ENDPTPRIME.Get() {
	} 
}
func ( d * dhw ) controlTransmit ( data uintptr , size uint32 , notify bool ) { const ( rm = uint32 ( 1 << descEndptConfigAttrRxPos ) tm = uint32 ( 1 << descEndptConfigAttrTxPos ) ) cd , ad := d . transferControl ( ) if size > 0 { cd . next = dhwTransferEOL cd . token = ( size << 16 ) | ( 1 << 7 ) for i := range cd . pointer { cd . pointer [ i ] = data + uintptr ( i ) * 4096 } qt := d . endpointQueueHead ( txEndpoint ( 0 ) ) qt . transfer . next = cd qt . transfer . token = 0 d . bus . ENDPTPRIME . SetBits ( tm ) for 0 != d . bus . ENDPTPRIME . Get ( ) { } } ad . next = dhwTransferEOL ad . token = 1 << 7 if notify { ad . token |= 1 << 15 } ad . pointer [ 0 ] = 0 qr := d . endpointQueueHead ( rxEndpoint ( 0 ) ) qr . transfer . next = ad qr . transfer . token = 0 d . bus . ENDPTCOMPLETE . Set ( rm | tm ) d . bus . ENDPTPRIME . SetBits ( rm ) if notify { d . controlMask = rm } for 0 != d . bus . ENDPTPRIME . Get ( ) { } }
controlTransmit transmits (Tx, IN) data on control endpoint 0.
controlTransmit transmits ( Tx IN ) data on control endpoint 0 .
// linked list is empty // wait for endpoint finish priming // Bit 7: active transfer // wait for endpoint finish priming