mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-18 03:14:42 +00:00
Turn the usbpid parameter of the programmer into a list of PIDs. Make
the JTAGICE3 programmer handle a list of PIDs, by trying each of them in sequence. Use a single, central jtag3_open_common() function to handle the common code of all jtag3_open_* functions. Centralize all USB VID/PID definitions in usbdevs.h. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1283 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -515,12 +515,7 @@ prog_parm_usb:
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
K_USBPID TKN_EQUAL TKN_NUMBER {
|
||||
{
|
||||
current_prog->usbpid = $3->value.number;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
K_USBPID TKN_EQUAL usb_pid_list |
|
||||
K_USBSN TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbsn, $3->value.string, PGM_USBSTRINGLEN);
|
||||
@@ -544,6 +539,29 @@ prog_parm_usb:
|
||||
}
|
||||
;
|
||||
|
||||
usb_pid_list:
|
||||
TKN_NUMBER {
|
||||
{
|
||||
int *ip = malloc(sizeof(int));
|
||||
if (ip) {
|
||||
*ip = $1->value.number;
|
||||
ladd(current_prog->usbpid, ip);
|
||||
}
|
||||
free_token($1);
|
||||
}
|
||||
} |
|
||||
usb_pid_list TKN_COMMA TKN_NUMBER {
|
||||
{
|
||||
int *ip = malloc(sizeof(int));
|
||||
if (ip) {
|
||||
*ip = $3->value.number;
|
||||
ladd(current_prog->usbpid, ip);
|
||||
}
|
||||
free_token($3);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
pin_number_non_empty:
|
||||
TKN_NUMBER { assign_pin(pin_name, $1, 0); }
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user