* ft245r.c (ft245r_open): allow for picking a default
device if none has been provided by -P git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1482 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
391439493d
commit
d947e5893f
|
@ -1,3 +1,8 @@
|
||||||
|
2021-11-24 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
* ft245r.c (ft245r_open): allow for picking a default
|
||||||
|
device if none has been provided by -P
|
||||||
|
|
||||||
2021-11-24 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2021-11-24 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
* jtag3.c (jtag3_edbg_recv_frame): Better handling for
|
* jtag3.c (jtag3_edbg_recv_frame): Better handling for
|
||||||
|
|
12
ft245r.c
12
ft245r.c
|
@ -559,10 +559,11 @@ static int ft245r_open(PROGRAMMER * pgm, char * port) {
|
||||||
|
|
||||||
// read device string cut after 8 chars (max. length of serial number)
|
// read device string cut after 8 chars (max. length of serial number)
|
||||||
if ((sscanf(port, "usb:%8s", device) != 1)) {
|
if ((sscanf(port, "usb:%8s", device) != 1)) {
|
||||||
avrdude_message(MSG_INFO,
|
avrdude_message(MSG_NOTICE,
|
||||||
"%s: ft245r_open(): invalid device identifier '%8s'\n",
|
"%s: ft245r_open(): no device identifier in portname, using default\n",
|
||||||
progname, device);
|
progname);
|
||||||
return -1;
|
pgm->usbsn[0] = 0;
|
||||||
|
devnum = 0;
|
||||||
} else {
|
} else {
|
||||||
if (strlen(device) == 8 ){ // serial number
|
if (strlen(device) == 8 ){ // serial number
|
||||||
if (verbose >= 2) {
|
if (verbose >= 2) {
|
||||||
|
@ -618,7 +619,8 @@ static int ft245r_open(PROGRAMMER * pgm, char * port) {
|
||||||
pgm->usbsn[0]?pgm->usbsn:NULL,
|
pgm->usbsn[0]?pgm->usbsn:NULL,
|
||||||
devnum);
|
devnum);
|
||||||
if (rv) {
|
if (rv) {
|
||||||
avrdude_message(MSG_INFO, "can't open ftdi device %d. (%s)\n", devnum, ftdi_get_error_string(handle));
|
avrdude_message(MSG_INFO, "%s: can't open ftdi device: %s\n",
|
||||||
|
progname, ftdi_get_error_string(handle));
|
||||||
goto cleanup_no_usb;
|
goto cleanup_no_usb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue