Skip to content

Commit

Permalink
serial_test: fix first write_count_value for next write
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor-Misic authored and bkueng committed Jul 25, 2022
1 parent 32ca7ad commit d6488fa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/systemcmds/serial_test/serial_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,14 @@ static void process_write_data(struct g_mod_t *g_mod, struct cli_args_t *g_cl)
count += c;

if (c <= g_mod->_write_size) {
g_mod->_write_count_value = g_mod->_write_data[c];

if (c == 0) {
g_mod->_write_count_value = g_mod->_write_data[0];

} else {
g_mod->_write_count_value = next_count_value(g_mod->_write_data[c - 1], g_cl->_ascii_range);
}

repeat = 0;
}
} while (repeat);
Expand Down

0 comments on commit d6488fa

Please sign in to comment.