mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-02 11:46:06 -04:00
Clarify switch_app reads and writes; add read test to testfw
This commit is contained in:
parent
4b4f014d38
commit
85ef93cd3c
2 changed files with 50 additions and 37 deletions
|
@ -151,10 +151,22 @@ int main()
|
|||
anyfailed = 1;
|
||||
}
|
||||
|
||||
uint32_t sw = *switch_app;
|
||||
if (sw != 0) {
|
||||
test_puts("FAIL: switch_app is not 0 in fw mode\r\n");
|
||||
anyfailed = 1;
|
||||
}
|
||||
|
||||
// Turn on application mode.
|
||||
// -------------------------
|
||||
*switch_app = 1;
|
||||
|
||||
sw = *switch_app;
|
||||
if (sw != 0xffffffff) {
|
||||
test_puts("FAIL: switch_app is not 0xffffffff in app mode\r\n");
|
||||
anyfailed = 1;
|
||||
}
|
||||
|
||||
// Should NOT be able to read from UDS in app-mode.
|
||||
wordcpy(uds_local, (void *)uds, 8);
|
||||
if (!memeq(uds_local, uds_zeros, 8 * 4)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue