Read stlink version info via libusb.
authorKarl Palsson <karlp@tweak.net.au>
Thu, 3 Nov 2011 03:45:23 +0000 (03:45 +0000)
committerKarl Palsson <karlp@tweak.net.au>
Thu, 3 Nov 2011 03:45:23 +0000 (03:45 +0000)
commit3bf3bbef0ba03fa54c531b94daaf0c4029c0af8b
treede38da188073796a3d29b48c218669ecf4594db4
parent214ecc86229ed46173b6d1f1bcc797dc2d6771d2
Read stlink version info via libusb.

Hooray! Stage 1 complete.  The stlink version can now be read by sending the scsi
commands via libusb directly, instead of using sg-utils.  It's very very prototype code
however, but should come together from here.

Major bugs: Only works when the device has been first plugged in.  I'm clearly not
resetting some usb state somewhere.

Now that libusb is being used directly, you can use linux usb-storage quirks to
completely IGNORE the device as mass storage.  We'll just grab it via libusb when we
want it.
src/stlink-sg.c
src/stlink-sg.h
src/stlink-usb.c