diff --git a/usbio_libusb.go b/usbio_libusb.go index 49cc77a..dfa2735 100644 --- a/usbio_libusb.go +++ b/usbio_libusb.go @@ -675,8 +675,8 @@ func (devhandle *UsbDevHandle) usbIppBasicCaps() (caps UsbIppBasicCaps) { } // OpenUsbInterface opens an interface -func (devhandle *UsbDevHandle) OpenUsbInterface(addr UsbIfAddr) ( - *UsbInterface, error) { +func (devhandle *UsbDevHandle) OpenUsbInterface(addr UsbIfAddr, + quirks Quirks) (*UsbInterface, error) { // Claim the interface rc := C.libusb_claim_interface( @@ -705,6 +705,7 @@ func (devhandle *UsbDevHandle) OpenUsbInterface(addr UsbIfAddr) ( return &UsbInterface{ devhandle: devhandle, addr: addr, + quirks: quirks, }, nil } @@ -712,6 +713,7 @@ func (devhandle *UsbDevHandle) OpenUsbInterface(addr UsbIfAddr) ( type UsbInterface struct { devhandle *UsbDevHandle // Device handle addr UsbIfAddr // Interface address + quirks Quirks // Device quirks } // Close the interface diff --git a/usbtransport.go b/usbtransport.go index 10b33c2..cec736a 100644 --- a/usbtransport.go +++ b/usbtransport.go @@ -697,7 +697,7 @@ func (transport *UsbTransport) openUsbConn( // Obtain interface var err error - conn.iface, err = dev.OpenUsbInterface(ifaddr) + conn.iface, err = dev.OpenUsbInterface(ifaddr, quirks) if err != nil { goto ERROR }