fix usb driver
This commit is contained in:
parent
59d6a8f8ea
commit
fee4989ad6
1 changed files with 3 additions and 3 deletions
|
@ -11,6 +11,9 @@ class UsbTransportException(message: String) : Exception(message)
|
|||
val UsbDevice.interfaces: Iterable<UsbInterface>
|
||||
get() = (0 until interfaceCount).map(::getInterface)
|
||||
|
||||
fun UsbDevice.getSmartCardInterface() =
|
||||
interfaces.find { it.interfaceClass == UsbConstants.USB_CLASS_CSCID }
|
||||
|
||||
val UsbInterface.endpoints: Iterable<UsbEndpoint>
|
||||
get() = (0 until endpointCount).map(::getEndpoint)
|
||||
|
||||
|
@ -22,6 +25,3 @@ fun UsbInterface.getBulkEndpoints(): Pair<UsbEndpoint?, UsbEndpoint?> {
|
|||
endpoints.find { it.direction == UsbConstants.USB_DIR_OUT },
|
||||
)
|
||||
}
|
||||
|
||||
fun UsbDevice.getSmartCardInterface() =
|
||||
interfaces.find { it.interfaceClass == UsbConstants.USB_CLASS_CSCID }
|
Loading…
Add table
Reference in a new issue