-
-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add device ID to prodtest #4735
base: main
Are you sure you want to change the base?
Conversation
|
287d44d
to
2330174
Compare
screen_prodtest_info(dom, strlen(dom), dom + sizeof(MODEL_IDENTIFIER) - 1, | ||
strlen(dom) - sizeof(MODEL_IDENTIFIER) + 1); | ||
char device_id[32] = {0}; | ||
if ((sectrue == flash_otp_read(FLASH_OTP_BLOCK_DEVICE_ID, 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this version that uses fewer hardcoded constants and modified condition for detection whether the block is programmed or not:
char device_id[FLASH_OTP_BLOCK_SIZE];
if ((sectrue == flash_otp_read(FLASH_OTP_BLOCK_DEVICE_ID, 0,
(uint8_t *)device_id, sizeof(device_id)) &&
(device_id[0] != 0xFF)) {
screen_prodtest_info(device_id, strnlen(device_id, sizeof(device_id) - 1));
}
strlen(dom) - sizeof(MODEL_IDENTIFIER) + 1); | ||
char device_id[32] = {0}; | ||
if ((sectrue == flash_otp_read(FLASH_OTP_BLOCK_DEVICE_ID, 0, | ||
(uint8_t *)device_id, 32) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we show batch id as before if the device id is not present?
This PR adds device ID storing capability - OTP block is allocated and commands for writing and reading device ID are added to prodtest.
The QR code in prodtest is altered to show device ID instead of batch.