mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-24 19:19:03 +00:00
fixup! refactor(core/prodtest): make cli non-blocking, event-loop compatible
This commit is contained in:
parent
7623646538
commit
24a5ea759d
@ -257,7 +257,7 @@ int main(void) {
|
||||
|
||||
while (true) {
|
||||
if (usb_vcp_can_read(VCP_IFACE)) {
|
||||
cli_run(&g_cli);
|
||||
cli_process_io(&g_cli);
|
||||
}
|
||||
|
||||
#if defined USE_BUTTON && defined USE_POWERCTL
|
||||
|
@ -557,7 +557,7 @@ static void cli_process_command(cli_t* cli, const cli_command_t* cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
void cli_run(cli_t* cli) {
|
||||
void cli_process_io(cli_t* cli) {
|
||||
int res;
|
||||
do {
|
||||
int ch = cli_readch(cli);
|
||||
|
@ -132,8 +132,8 @@ bool cli_init(cli_t* cli, cli_read_cb_t read, cli_write_cb_t write,
|
||||
void cli_set_commands(cli_t* cli, const cli_command_t* cmd_array,
|
||||
size_t cmd_count);
|
||||
|
||||
// Runs the CLI. Only to be called when new data are available.
|
||||
void cli_run(cli_t* cli);
|
||||
// Process the newly received characters from the console input
|
||||
void cli_process_io(cli_t* cli);
|
||||
|
||||
// Returne the number of arguments in the command line
|
||||
size_t cli_arg_count(cli_t* cli);
|
||||
|
Loading…
Reference in New Issue
Block a user