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:
parent
75ad61f7ef
commit
ce6be8600b
8 changed files with 67 additions and 44 deletions
|
@ -70,7 +70,7 @@ static int cursor_position_get(const struct shell *shell, u16_t *x, u16_t *y)
|
|||
/* fprintf buffer needs to be flushed to start sending prepared
|
||||
* escape code to the terminal.
|
||||
*/
|
||||
shell_fprintf_buffer_flush(shell->fprintf_ctx);
|
||||
transport_buffer_flush(shell);
|
||||
|
||||
/* timeout for terminal response = ~1s */
|
||||
for (u16_t i = 0; i < 1000; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue