String formatting
Allign colons, only print clocks that are actually present (>0 kHz)
This commit is contained in:
parent
f6bbaadfa6
commit
b581d14823
24
src/jtag3.c
24
src/jtag3.c
|
@ -2364,8 +2364,8 @@ static void jtag3_display(PROGRAMMER * pgm, const char * p)
|
||||||
memmove(resp, resp + 3, status - 3);
|
memmove(resp, resp + 3, status - 3);
|
||||||
resp[status - 3] = 0;
|
resp[status - 3] = 0;
|
||||||
|
|
||||||
avrdude_message(MSG_INFO, "%sICE hardware version: %d\n", p, parms[0]);
|
avrdude_message(MSG_INFO, "%sICE HW version : %d\n", p, parms[0]);
|
||||||
avrdude_message(MSG_INFO, "%sICE firmware version: %d.%02d (rel. %d)\n", p,
|
avrdude_message(MSG_INFO, "%sICE FW version : %d.%02d (rel. %d)\n", p,
|
||||||
parms[1], parms[2],
|
parms[1], parms[2],
|
||||||
(parms[3] | (parms[4] << 8)));
|
(parms[3] | (parms[4] << 8)));
|
||||||
avrdude_message(MSG_INFO, "%sSerial number : %s", p, resp);
|
avrdude_message(MSG_INFO, "%sSerial number : %s", p, resp);
|
||||||
|
@ -2385,23 +2385,35 @@ static void jtag3_print_parms1(PROGRAMMER * pgm, const char * p)
|
||||||
|
|
||||||
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_MEGA_PROG, buf, 2) < 0)
|
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_MEGA_PROG, buf, 2) < 0)
|
||||||
return;
|
return;
|
||||||
avrdude_message(MSG_INFO, "%sJTAG clock megaAVR/program: %u kHz\n", p,
|
|
||||||
|
if (b2_to_u16(buf) > 0) {
|
||||||
|
avrdude_message(MSG_INFO, "%sJTAG clock megaAVR/program : %u kHz\n", p,
|
||||||
b2_to_u16(buf));
|
b2_to_u16(buf));
|
||||||
|
}
|
||||||
|
|
||||||
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_MEGA_DEBUG, buf, 2) < 0)
|
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_MEGA_DEBUG, buf, 2) < 0)
|
||||||
return;
|
return;
|
||||||
avrdude_message(MSG_INFO, "%sJTAG clock megaAVR/debug: %u kHz\n", p,
|
|
||||||
|
if (b2_to_u16(buf) > 0) {
|
||||||
|
avrdude_message(MSG_INFO, "%sJTAG clock megaAVR/debug : %u kHz\n", p,
|
||||||
b2_to_u16(buf));
|
b2_to_u16(buf));
|
||||||
|
}
|
||||||
|
|
||||||
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_XMEGA_JTAG, buf, 2) < 0)
|
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_XMEGA_JTAG, buf, 2) < 0)
|
||||||
return;
|
return;
|
||||||
avrdude_message(MSG_INFO, "%sJTAG clock Xmega: %u kHz\n", p,
|
|
||||||
|
if (b2_to_u16(buf) > 0) {
|
||||||
|
avrdude_message(MSG_INFO, "%sJTAG clock Xmega : %u kHz\n", p,
|
||||||
b2_to_u16(buf));
|
b2_to_u16(buf));
|
||||||
|
}
|
||||||
|
|
||||||
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_XMEGA_PDI, buf, 2) < 0)
|
if (jtag3_getparm(pgm, SCOPE_AVR, 1, PARM3_CLK_XMEGA_PDI, buf, 2) < 0)
|
||||||
return;
|
return;
|
||||||
avrdude_message(MSG_INFO, "%sPDI/UPDI clock Xmega : %u kHz\n\n", p,
|
|
||||||
|
if (b2_to_u16(buf) > 0) {
|
||||||
|
avrdude_message(MSG_INFO, "%sPDI/UPDI clock Xmega/megaAVR : %u kHz\n\n", p,
|
||||||
b2_to_u16(buf));
|
b2_to_u16(buf));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void jtag3_print_parms(PROGRAMMER * pgm)
|
static void jtag3_print_parms(PROGRAMMER * pgm)
|
||||||
|
|
Loading…
Reference in New Issue