mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
Implement a flags field in struct serdev, and populate it with a flag
that indicates whether the underlying communication can dynamically change its speed or not. This flag is set for true serial communication but clear for USB communication. Don't try to adjust the speed when talking over a communication channel that doesn't support it. (The Dragon does not even support the respective parameter.) git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@676 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -202,11 +202,6 @@ static int usbdev_open(char * port, long baud)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static int usbdev_setspeed(int fd, long baud)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void usbdev_close(int fd)
|
||||
{
|
||||
usb_dev_handle *udev = (usb_dev_handle *)fd;
|
||||
@@ -431,11 +426,11 @@ static int usbdev_drain(int fd, int display)
|
||||
struct serial_device usb_serdev =
|
||||
{
|
||||
.open = usbdev_open,
|
||||
.setspeed = usbdev_setspeed,
|
||||
.close = usbdev_close,
|
||||
.send = usbdev_send,
|
||||
.recv = usbdev_recv,
|
||||
.drain = usbdev_drain,
|
||||
.flags = SERDEV_FL_NONE,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -444,11 +439,11 @@ struct serial_device usb_serdev =
|
||||
struct serial_device usb_serdev_frame =
|
||||
{
|
||||
.open = usbdev_open,
|
||||
.setspeed = usbdev_setspeed,
|
||||
.close = usbdev_close,
|
||||
.send = usbdev_send,
|
||||
.recv = usbdev_recv_frame,
|
||||
.drain = usbdev_drain,
|
||||
.flags = SERDEV_FL_NONE,
|
||||
};
|
||||
|
||||
#endif /* HAVE_LIBUSB */
|
||||
|
Reference in New Issue
Block a user