Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
vracton authored Apr 24, 2024
2 parents 6e6644f + fc00422 commit 4d9a97f
Show file tree
Hide file tree
Showing 4 changed files with 1,724 additions and 2 deletions.
6 changes: 4 additions & 2 deletions firmware/spade/src/rpi/upload.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ static int upl_stdin_read(void) {

switch (upl_state.prog) {
case UplProg_StartSeq: {
if (c != upl_state.len_i) {
upl_state.len_i = 0;
}

if (c == upl_state.len_i) {
upl_state.len_i++;

Expand All @@ -64,8 +68,6 @@ static int upl_stdin_read(void) {
memset(&upl_state, 0, sizeof(upl_state));
upl_state.prog = UplProg_Header;
}
} else {
upl_state.len_i = 0;
}
} break;
case UplProg_Header: {
Expand Down
Loading

0 comments on commit 4d9a97f

Please sign in to comment.