mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-17 02:40:49 -04:00
storage: add erase command
Add an erase command to let the user have more control over the allocated area. This will also be more familiar to embedded developers. As a bonus it minimizes the logic needed in firmware, and in theory we can now increase the current write limit of one sector.
This commit is contained in:
parent
6ac874584d
commit
290f826e76
4 changed files with 49 additions and 9 deletions
|
@ -34,6 +34,11 @@ int syscall(syscall_t *ctx)
|
|||
ctx->size);
|
||||
break;
|
||||
|
||||
case ERASE_DATA:
|
||||
return storage_erase_sector(&part_table, ctx->offset,
|
||||
ctx->size);
|
||||
break;
|
||||
|
||||
case PRELOAD_STORE:
|
||||
return preload_store(&part_table, ctx->offset, ctx->data,
|
||||
ctx->size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue