You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2019/10/17 11:47:21 UTC

[mynewt-core] 13/21: sys/console: Fix usage of uart_console_blocking_mode

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit f5a14cff79d4017a6f155f3b619e6c2762412872
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Oct 8 15:25:08 2019 +0200

    sys/console: Fix usage of uart_console_blocking_mode
    
    Uart blocking mode was was enabled for handling auto completion
    only when CONSOLE_UART_RX_BUF_SIZE was zero.
    For history access this check was missing.
---
 sys/console/full/src/console.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/console/full/src/console.c b/sys/console/full/src/console.c
index fc720c4..4ba5fa1 100644
--- a/sys/console/full/src/console.c
+++ b/sys/console/full/src/console.c
@@ -641,9 +641,13 @@ ansi_cmd:
 #if MYNEWT_VAL(CONSOLE_HISTORY_SIZE) > 0
     case ANSI_UP:
     case ANSI_DOWN:
+#if MYNEWT_VAL(CONSOLE_UART_RX_BUF_SIZE) == 0
         console_blocking_mode();
+#endif
         console_hist_move(line, byte);
+#if MYNEWT_VAL(CONSOLE_UART_RX_BUF_SIZE) == 0
         console_non_blocking_mode();
+#endif
         break;
 #endif
     case ANSI_BACKWARD: