Change the second parameter of the ser_open method from "baud" into a

"union pinfo", so the USB parameters can be passed without hacks.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1276 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2014-02-21 13:44:11 +00:00
parent f7cc3ff662
commit 66e2a16c9c
16 changed files with 155 additions and 77 deletions

View File

@@ -61,7 +61,7 @@ static int usb_interface;
* The "baud" parameter is meaningless for USB devices, so we reuse it
* to pass the desired USB device ID.
*/
static int usbdev_open(char * port, long baud, union filedescriptor *fd)
static int usbdev_open(char * port, union pinfo pinfo, union filedescriptor *fd)
{
char string[256];
char product[256];
@@ -115,8 +115,8 @@ static int usbdev_open(char * port, long baud, union filedescriptor *fd)
{
for (dev = bus->devices; dev; dev = dev->next)
{
if (dev->descriptor.idVendor == USB_VENDOR_ATMEL &&
dev->descriptor.idProduct == (unsigned short)baud)
if (dev->descriptor.idVendor == pinfo.usbinfo.vid &&
dev->descriptor.idProduct == pinfo.usbinfo.pid)
{
udev = usb_open(dev);
if (udev)