I've been looking through /usr/include/usb.h to try to simplify some of my 
code.

Currently I find a device by looping through usb_get_busses()
This returns a struct usb_device

>From this I extract the UsbDev->bus->dirname, UsbDev->filename to build a 
device path "/proc/bus/usb/dir/file" so I can
fd = open(device_path, O_RDWR);
>From this I can issue ioctl(fd, ...) calls to upload my firmware

But then I use libusb again with UsbHandle=usb_open(UsbDev) and keep on 
working with the UsbHandle to pass on my bulk data.

My question is: can I simplify the firmware upload
- getting directly fd from the UsbHandle ?
- replacing the ioctl calls by calls to libusb ?

This is probably an easy question, but I'm still a bit confused by the 
separate APIs used to do similar things.

Thanks.
-- 
Guillaume Dargaud
http://www.gdargaud.net/Antarctica/ 



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to