Pass all required info to newEndpoint.

This commit is contained in:
Sebastian Zagrodzki
2017-02-26 21:44:15 +01:00
parent 676cb78cae
commit d0859b8c47

View File

@@ -78,10 +78,12 @@ func (e *endpoint) transfer(buf []byte, timeout time.Duration) (int, error) {
return n, nil
}
func newEndpoint(d *Device) *endpoint {
func newEndpoint(d *Device, s InterfaceSetup, e EndpointInfo) *endpoint {
return &endpoint{
h: d.handle,
readTimeout: d.ReadTimeout,
writeTimeout: d.WriteTimeout,
InterfaceSetup: s,
EndpointInfo: e,
h: d.handle,
readTimeout: d.ReadTimeout,
writeTimeout: d.WriteTimeout,
}
}