FIX printing Lot Number
This commit is contained in:
parent
02ffadd86a
commit
89917dc269
@ -134,6 +134,7 @@ int do_devid(char *args) {
|
|||||||
uint32_t myint[2];
|
uint32_t myint[2];
|
||||||
char mychar[8];
|
char mychar[8];
|
||||||
} my;
|
} my;
|
||||||
|
//char lot[sizeof(my) + 1];
|
||||||
|
|
||||||
printf("DEVID: 0x%08lx\n", HAL_GetDEVID());
|
printf("DEVID: 0x%08lx\n", HAL_GetDEVID());
|
||||||
printf("REVID: 0x%08lx\n", HAL_GetREVID());
|
printf("REVID: 0x%08lx\n", HAL_GetREVID());
|
||||||
@ -141,9 +142,10 @@ int do_devid(char *args) {
|
|||||||
|
|
||||||
my.myint[1] = HAL_GetUIDw2();
|
my.myint[1] = HAL_GetUIDw2();
|
||||||
my.myint[0] = HAL_GetUIDw1();
|
my.myint[0] = HAL_GetUIDw1();
|
||||||
my.mychar[8] = '\0';
|
//memcpy(lot, my.mychar, sizeof(my.mychar));
|
||||||
|
//lot[sizeof(my)] = '\0';
|
||||||
|
|
||||||
printf("=> Lot Number: %s\n", my.mychar);
|
printf("=> Lot Number: %.8s\n", my.mychar);
|
||||||
printf("=> Wafer Number: %u\n", (uint8_t)(HAL_GetUIDw1() & 0xff));
|
printf("=> Wafer Number: %u\n", (uint8_t)(HAL_GetUIDw1() & 0xff));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user