Move hvupdi_support list to a new prog_parm_updi group, and initialize the list.
This commit is contained in:
parent
9e5ea25b9e
commit
91310e6f50
|
@ -40,7 +40,7 @@
|
||||||
# usbvendor = <vendorname>; # USB Vendor Name
|
# usbvendor = <vendorname>; # USB Vendor Name
|
||||||
# usbproduct = <productname>; # USB Product Name
|
# usbproduct = <productname>; # USB Product Name
|
||||||
# usbsn = <serialno>; # USB Serial Number
|
# usbsn = <serialno>; # USB Serial Number
|
||||||
# hvupdi_support = <num>, <num>, ...; # UPDI HV Variants Support
|
# hvupdi_support = <num> [, <num>, ... ] ; # UPDI HV Variants Support
|
||||||
#
|
#
|
||||||
# To invert a bit, use = ~ <num>, the spaces are important.
|
# To invert a bit, use = ~ <num>, the spaces are important.
|
||||||
# For a pin list all pins must be inverted.
|
# For a pin list all pins must be inverted.
|
||||||
|
|
|
@ -477,7 +477,8 @@ prog_parm :
|
||||||
current_prog->baudrate = $3->value.number;
|
current_prog->baudrate = $3->value.number;
|
||||||
free_token($3);
|
free_token($3);
|
||||||
}
|
}
|
||||||
}
|
} |
|
||||||
|
prog_parm_updi
|
||||||
;
|
;
|
||||||
|
|
||||||
prog_parm_type:
|
prog_parm_type:
|
||||||
|
@ -548,7 +549,6 @@ prog_parm_usb:
|
||||||
free_token($3);
|
free_token($3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
K_HVUPDI_SUPPORT TKN_EQUAL hvupdi_support_list
|
|
||||||
;
|
;
|
||||||
|
|
||||||
usb_pid_list:
|
usb_pid_list:
|
||||||
|
@ -579,10 +579,14 @@ usb_pid_list:
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
prog_parm_updi:
|
||||||
|
K_HVUPDI_SUPPORT TKN_EQUAL hvupdi_support_list
|
||||||
|
;
|
||||||
|
|
||||||
hvupdi_support_list:
|
hvupdi_support_list:
|
||||||
TKN_NUMBER {
|
TKN_NUMBER {
|
||||||
{
|
{
|
||||||
/* overwrite pids, so clear the existing entries */
|
/* overwrite list entries, so clear the existing entries */
|
||||||
ldestroy_cb(current_prog->hvupdi_support, free);
|
ldestroy_cb(current_prog->hvupdi_support, free);
|
||||||
current_prog->hvupdi_support = lcreat(NULL, 0);
|
current_prog->hvupdi_support = lcreat(NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1649,6 +1649,15 @@ static int jtag3_open_updi(PROGRAMMER * pgm, char * port)
|
||||||
{
|
{
|
||||||
avrdude_message(MSG_NOTICE2, "%s: jtag3_open_updi()\n", progname);
|
avrdude_message(MSG_NOTICE2, "%s: jtag3_open_updi()\n", progname);
|
||||||
|
|
||||||
|
LNODEID ln;
|
||||||
|
unsigned int hv_sup;
|
||||||
|
avrdude_message(MSG_NOTICE2, "%s: HV UPDI support:", progname);
|
||||||
|
for (ln = lfirst(pgm->hvupdi_support); ln; ln = lnext(ln)) {
|
||||||
|
hv_sup = (unsigned int)(*(int *)ldata(ln));
|
||||||
|
avrdude_message(MSG_NOTICE2, " %d", hv_sup);
|
||||||
|
}
|
||||||
|
avrdude_message(MSG_NOTICE2, "\n", progname);
|
||||||
|
|
||||||
if (jtag3_open_common(pgm, port) < 0)
|
if (jtag3_open_common(pgm, port) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ typedef struct avrpart {
|
||||||
char desc[AVR_DESCLEN]; /* long part name */
|
char desc[AVR_DESCLEN]; /* long part name */
|
||||||
char id[AVR_IDLEN]; /* short part name */
|
char id[AVR_IDLEN]; /* short part name */
|
||||||
char family_id[AVR_FAMILYIDLEN+1]; /* family id in the SIB (avr8x) */
|
char family_id[AVR_FAMILYIDLEN+1]; /* family id in the SIB (avr8x) */
|
||||||
int hvupdi_variant; /* 12V pulse on UPDI pin, no pin or RESET pin */
|
int hvupdi_variant; /* HV pulse on UPDI pin, no pin or RESET pin */
|
||||||
int stk500_devcode; /* stk500 device code */
|
int stk500_devcode; /* stk500 device code */
|
||||||
int avr910_devcode; /* avr910 device code */
|
int avr910_devcode; /* avr910 device code */
|
||||||
int chip_erase_delay; /* microseconds */
|
int chip_erase_delay; /* microseconds */
|
||||||
|
|
|
@ -83,6 +83,7 @@ PROGRAMMER * pgm_new(void)
|
||||||
pgm->lineno = 0;
|
pgm->lineno = 0;
|
||||||
pgm->baudrate = 0;
|
pgm->baudrate = 0;
|
||||||
pgm->initpgm = NULL;
|
pgm->initpgm = NULL;
|
||||||
|
pgm->hvupdi_support = lcreat(NULL, 0);
|
||||||
|
|
||||||
for (i=0; i<N_PINS; i++) {
|
for (i=0; i<N_PINS; i++) {
|
||||||
pgm->pinno[i] = 0;
|
pgm->pinno[i] = 0;
|
||||||
|
|
Loading…
Reference in New Issue