Working on iso

This commit is contained in:
Kyle Lemons
2012-04-15 18:58:18 -07:00
parent 9849a972c6
commit 1e5170b125
4 changed files with 86 additions and 32 deletions

View File

@@ -25,7 +25,7 @@ type endpoint struct {
}
func (e *endpoint) Read(buf []byte) (int, error) {
if EndpointDirection(e.Address)&ENDPOINT_DIR_MASK != ENDPOINT_DIR_OUT {
if EndpointDirection(e.Address)&ENDPOINT_DIR_MASK != ENDPOINT_DIR_IN {
return 0, fmt.Errorf("usb: read: not an IN endpoint")
}
@@ -40,8 +40,8 @@ func (e *endpoint) Write(buf []byte) (int, error) {
return e.xfer(e, buf, e.WriteTimeout)
}
func (e *endpoint) Interface() InterfaceSetup { return InterfaceSetup{} }
func (e *endpoint) Info() EndpointInfo { return EndpointInfo{} }
func (e *endpoint) Interface() InterfaceSetup { return e.InterfaceSetup }
func (e *endpoint) Info() EndpointInfo { return e.EndpointInfo }
// TODO(kevlar): (*Endpoint).Close