shell: safe print from different threads

Added display text management to shell_fprintf function.
Now it can be used from diffrent threads with not risk that
displayed lines will overlay.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2019-01-29 11:40:08 +01:00 committed by Carles Cufí
commit ce6be8600b
8 changed files with 67 additions and 44 deletions

View file

@ -378,3 +378,4 @@ void shell_cmd_trim(const struct shell *shell)
buffer_trim(shell->ctx->cmd_buff, &shell->ctx->cmd_buff_len);
shell->ctx->cmd_buff_pos = shell->ctx->cmd_buff_len;
}