You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/09/27 19:18:07 UTC

[5/6] incubator-mynewt-core git commit: This closes #100.

This closes #100.

Use less memory when console history is disabled


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/1c362560
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/1c362560
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/1c362560

Branch: refs/heads/develop
Commit: 1c362560d1b9267a97747261b871ce80aa05ea1d
Parents: 437b5fc
Author: Fabio Utzig <ut...@utzig.org>
Authored: Sun Sep 4 18:26:44 2016 -0300
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Sep 27 12:13:54 2016 -0700

----------------------------------------------------------------------
 libs/console/full/src/cons_tty.c | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1c362560/libs/console/full/src/cons_tty.c
----------------------------------------------------------------------
diff --git a/libs/console/full/src/cons_tty.c b/libs/console/full/src/cons_tty.c
index 95a5ecb..b14fd07 100644
--- a/libs/console/full/src/cons_tty.c
+++ b/libs/console/full/src/cons_tty.c
@@ -368,7 +368,11 @@ console_rx_char(void *arg, uint8_t data)
     struct console_ring *rx = &ct->ct_rx;
     int tx_space = 0;
     int i;
+#ifdef CONSOLE_HIST_ENABLE
     uint8_t tx_buf[CONSOLE_RX_BUF_SZ];
+#else
+    uint8_t tx_buf[3];
+#endif
 
     if (CONSOLE_HEAD_INC(&ct->ct_rx) == ct->ct_rx.cr_tail) {
         /*