use pgm->id to identify Power Debugger instead of USB PID

This commit is contained in:
MCUdude 2022-10-01 20:50:51 +02:00
parent e39133daf5
commit e05aa16510
2 changed files with 5 additions and 2 deletions

View File

@ -2416,8 +2416,7 @@ void jtag3_print_parms1(const PROGRAMMER *pgm, const char *p) {
verbose ? "" : " ", b2_to_u16(buf) / 1000.0);
// Print features unique to the Power Debugger
//if (strncmp("powerdebugger", ldata(lfirst(pgm->id)), strlen("powerdebugger")) == 0)
if (*(int *)(ldata(lfirst(pgm->usbpid))) == 0x2144){
if (strncmp("powerdebugger", ldata(lfirst(pgm->id)), strlen("powerdebugger")) == 0) {
short analog_raw_data;
// Read generator set voltage value (VOUT)

View File

@ -3226,6 +3226,10 @@ static void stk500v2_print_parms1(const PROGRAMMER *pgm, const char *p) {
} else if (PDATA(pgm)->pgmtype == PGMTYPE_JTAGICE3) {
PROGRAMMER *pgmcp = pgm_dup(pgm);
pgmcp->cookie = PDATA(pgm)->chained_pdata;
pgmcp->id = lcreat(NULL, 0);
// Copy pgm->id contents over to pgmcp->id
for(LNODEID ln=lfirst(pgm->id); ln; ln=lnext(ln))
ladd(pgmcp->id, cfg_strdup("stk500v2_print_parms1()", ldata(ln)));
jtag3_print_parms1(pgmcp, p);
pgm_free(pgmcp);
} else {