Use HV UPDI constants rather than arbitrary numbers

This commit is contained in:
MCUdude
2022-06-26 19:54:40 +02:00
parent 50220289bb
commit 577856cf15
2 changed files with 8 additions and 3 deletions

View File

@@ -1252,8 +1252,10 @@ static int jtag3_initialize(PROGRAMMER * pgm, AVRPART * p)
}
}
// Generate 12V UPDI pulse if user asks for it and hardware supports it
if(p->flags & AVRPART_HAS_UPDI && PDATA(pgm)->use_hvupdi == true && p->hvupdi_variant == 0) {
// Generate 12V UPDI pulse if user asks for it and hardware supports it
if (p->flags & AVRPART_HAS_UPDI &&
PDATA(pgm)->use_hvupdi == true &&
p->hvupdi_variant == HV_UPDI_VARIANT_0) {
parm[0] = PARM3_UPDI_HV_SIMPLE_PULSE;
if (jtag3_setparm(pgm, SCOPE_AVR, 3, PARM3_OPT_12V_UPDI_ENABLE, parm, 1) < 0)
return -1;
@@ -1458,7 +1460,6 @@ static int jtag3_parseextparms(PROGRAMMER * pgm, LISTID extparms)
LNODEID ln;
const char *extended_param;
int rv = 0;
avrdude_message(MSG_INFO, "id: %s, desc: %s, type: %s\n", ldata(lfirst(pgm->id)), pgm->desc, pgm->type);
for (ln = lfirst(extparms); ln; ln = lnext(ln)) {
extended_param = ldata(ln);