diff options
Diffstat (limited to 'board/netphone/phone_console.c')
-rw-r--r-- | board/netphone/phone_console.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/board/netphone/phone_console.c b/board/netphone/phone_console.c index a0485b0..c6a59af 100644 --- a/board/netphone/phone_console.c +++ b/board/netphone/phone_console.c @@ -179,7 +179,6 @@ static int last_input_mode; static int refresh_time; static int blink_time; static char last_fast_punct; -static int last_tab_indicator = -1; /*************************************************************************************************/ @@ -239,8 +238,6 @@ static void console_init(void) refresh_time = REFRESH_HZ; blink_time = BLINK_HZ; - tab_indicator = 1; - memset(vty_buf, ' ', sizeof(vty_buf)); memset(last_visible_buf, ' ', sizeof(last_visible_buf)); @@ -253,6 +250,8 @@ static void console_init(void) sed156x_init(); width = sed156x_text_width; height = sed156x_text_height - 1; + + tab_indicator = 0; } /*****************************************************************************/ @@ -718,8 +717,10 @@ static void update(void) if (input_mode != last_input_mode) sed156x_output_at(sed156x_text_width - 3, sed156x_text_height - 1, input_mode_txt[input_mode], 3); - if (tab_indicator != last_tab_indicator) + if (tab_indicator == 0) { sed156x_output_at(0, sed156x_text_height - 1, "\\t", 2); + tab_indicator = 1; + } if (fast_punct != last_fast_punct) sed156x_output_at(4, sed156x_text_height - 1, &fast_punct, 1); @@ -779,7 +780,6 @@ static void update(void) last_input_mode = input_mode; last_fast_punct = fast_punct; - last_tab_indicator = tab_indicator; } /* ensure visibility; the trick is to minimize the screen movement */ @@ -891,7 +891,8 @@ void phone_putc(const char c) blink_time = BLINK_HZ; switch (c) { - case 13: /* ignore */ + case '\a': /* ignore bell */ + case '\r': /* ignore carriage return */ break; case '\n': /* next line */ @@ -1141,3 +1142,10 @@ static void kp_do_poll(void) break; } } + +/**************************************************************************************/ + +int drv_phone_is_idle(void) +{ + return kp_state == SCAN; +} |