|
From: Graeme G. <gr...@ar...> - 2016-03-15 12:15:40
|
Antão Almada wrote: Hi, > I also tried to use some of the many forks that add an fd parameter to > libusb_open() but then what do I pass in for the first parameter? You pass the fd. > Do I have > to get it from libusb_get_device_list()? If so, how do I map the Android > UsbDevice or UsbAccessory to a libusb_device? You get a devlist from mUsbManager.getDeviceList() and pick a UsbDevice from it. You get a UsbDeviceConnection using mUsbManager.openDevice(usbdevice) You get the fd using usbdeviceconnection.getFileDescriptor() Hope that helps. Graeme Gill. |