mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-05-09 17:34:59 -04:00
fw: Add ERASE_DATA syscall
Erase one or more flash sectors in app storage areas
This commit is contained in:
parent
a9d3dd7242
commit
9c1bb53d7a
2 changed files with 31 additions and 1 deletions
|
@ -78,6 +78,14 @@ int32_t syscall_handler(uint32_t number, uint32_t arg1, uint32_t arg2,
|
|||
}
|
||||
return 0;
|
||||
|
||||
case TK1_SYSCALL_ERASE_DATA:
|
||||
if (storage_erase_sector(&part_table_storage.table, arg1,
|
||||
arg2) < 0) {
|
||||
debug_puts("couldn't erase storage area\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
case TK1_SYSCALL_GET_VIDPID:
|
||||
// UDI is 2 words: VID/PID & serial. Return just the
|
||||
// first word. Serial is kept secret to the device
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue