mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-11-15 05:20:43 -05:00
fw: Change max frame size to 128 bytes
This commit is contained in:
parent
29c5ab1108
commit
cefb6ca9c1
5 changed files with 60 additions and 49 deletions
|
|
@ -188,7 +188,7 @@ static enum state initial_commands(const struct frame_header *hdr,
|
|||
uint32_t local_app_size;
|
||||
|
||||
htif_puts("cmd: load-app(size, uss)\n");
|
||||
if (hdr->len != 512) {
|
||||
if (hdr->len != 128) {
|
||||
// Bad length
|
||||
state = FW_STATE_FAIL;
|
||||
break;
|
||||
|
|
@ -253,14 +253,14 @@ static enum state loading_commands(const struct frame_header *hdr,
|
|||
switch (cmd[0]) {
|
||||
case FW_CMD_LOAD_APP_DATA:
|
||||
htif_puts("cmd: load-app-data\n");
|
||||
if (hdr->len != 512) {
|
||||
if (hdr->len != 128) {
|
||||
// Bad length
|
||||
state = FW_STATE_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ctx->left > (512 - 1)) {
|
||||
nbytes = 512 - 1;
|
||||
if (ctx->left > (128 - 1)) {
|
||||
nbytes = 128 - 1;
|
||||
} else {
|
||||
nbytes = ctx->left;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue