shell: fix missing "update" for the last RXRDY signal

Fixed the issue when sometimes "update" is not called for the
last RXRDY signal. First, need to reset the signal and only
after that need to call the "update" function.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
This commit is contained in:
Yuriy Vynnychek 2022-04-20 15:16:28 +03:00 committed by Carles Cufí
commit e71448a00d

View file

@ -1330,10 +1330,6 @@ void shell_thread(void *shell_handle, void *arg_log_backend,
k_mutex_lock(&shell->ctx->wr_mtx, K_FOREVER);
if (shell->iface->api->update) {
shell->iface->api->update(shell->iface);
}
shell_signal_handle(shell, SHELL_SIGNAL_KILL, kill_handler);
shell_signal_handle(shell, SHELL_SIGNAL_RXRDY, shell_process);
if (IS_ENABLED(CONFIG_SHELL_LOG_BACKEND)) {
@ -1341,6 +1337,10 @@ void shell_thread(void *shell_handle, void *arg_log_backend,
shell_log_process);
}
if (shell->iface->api->update) {
shell->iface->api->update(shell->iface);
}
k_mutex_unlock(&shell->ctx->wr_mtx);
}
}