1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

hexdump complete BIST info for debugging

This commit is contained in:
rjkm 2021-08-20 14:27:36 +02:00
parent a97787c3b6
commit 1518ba54a4

View File

@ -30,6 +30,21 @@ char *Rolloff[8] = {
"rsvd", "rsvd",
}; };
void dump(const uint8_t *b, int l)
{
int i, j;
for (j = 0; j < l; j += 16, b += 16) {
printf("%04x: ", j);
for (i = 0; i < 16; i++)
if (i + j < l)
printf("%02x ", b[i]);
else
printf(" ");
printf("\n");
}
}
void print_temp(struct mci_result *res) void print_temp(struct mci_result *res)
{ {
printf("Die temperature = %u\n", res->sx8_bist.temperature); printf("Die temperature = %u\n", res->sx8_bist.temperature);
@ -55,6 +70,9 @@ int temp_info(int dev, uint32_t link)
} }
print_temp(&msg.res); print_temp(&msg.res);
printf("BIST info dump: ");
dump((uint8_t *) &msg.res, 16);
return ret; return ret;
} }