Skip to content
Commit 5bb72126 authored by Jakub Rzeszutko's avatar Jakub Rzeszutko Committed by Alberto Escolar
Browse files

shell: add generic RX buffer flush function



Added a generic function `z_shell_backend_rx_buffer_flush` to clear
the RX buffer when resuming the shell. The function repeatedly calls
the backend's `read` API until the buffer is empty or a maximum of
1000 iterations is reached. This prevents unintended command
execution after `shell_start`.

Signed-off-by: default avatarJakub Rzeszutko <jakub.rzeszutko@verkada.com>
parent d427d8a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment