Simplify chip revision code

This commit is contained in:
stefanrueger
2025-05-03 14:43:18 +02:00
parent d5720026e5
commit d6797808a8

View File

@@ -1493,10 +1493,8 @@ static int pickit5_updi_read_sib(const PROGRAMMER *pgm, const AVRPART *p, char *
static int pickit5_read_chip_rev(const PROGRAMMER *pgm, const AVRPART *p, unsigned char *chip_rev) {
pmsg_debug("%s()\n", __func__);
if(is_updi(pgm)) // On UPDI Devices, the chip revision is sent as the 4th byte
*chip_rev = my.devID[3];
else // For the rest, more research is neccessary
*chip_rev = 0x00;
// On UPDI Devices the chip revision is sent as the 4th byte; the rest needs more research
*chip_rev = is_updi(pgm)? my.devID[3]: 0x00;
return 0;
}