// endpointComplete handles transfer completion of a data endpoint.
endpointComplete handles transfer completion of a data endpoint.
// endpointComplete handles transfer completion of a data endpoint .
func (d *dhw) endpointComplete(endpoint uint8) {
	ep := d.endpointQueueHead(endpoint)
	if nil == ep.first {
		return
	}
	count := 0
	first := ep.first
	for t, eol := first, false; !eol; t, eol = t.nextTransfer() {
		if eol {
			ep.first = nil
			ep.last = nil
		} else {
			if 0 != t.token&(1<<7) { 
				ep.first = t
				break
			} else {
				count += 1
			}
		}
	}
	for i := 0; i < count; i++ {
		next := first.next
		ep.callback(first)
		first = next
	}
}
func ( d * dhw ) endpointComplete ( endpoint uint8 ) { ep := d . endpointQueueHead ( endpoint ) if nil == ep . first { return } count := 0 first := ep . first for t , eol := first , false ; ! eol ; t , eol = t . nextTransfer ( ) { if eol { ep . first = nil ep . last = nil } else { if 0 != t . token & ( 1 << 7 ) { ep . first = t break } else { count += 1 } } } for i := 0 ; i < count ; i ++ { next := first . next ep . callback ( first ) first = next } }
endpointComplete handles transfer completion of a data endpoint.
endpointComplete handles transfer completion of a data endpoint .
// reached end of list, new list empty // Bit 7: active transfer // new list begins here // invoke all callbacks