
18 Mar
2015
18 Mar
'15
2:06 p.m.
Hi Andrey,
On 03/14/2015 12:49 AM, Andrey Danin wrote:
This code is based on ansi implementation in cfb_console. It is adopted to be used in lcd and cfb_console drivers.
Please describe what changes you have made (if any) from the original code.
Signed-off-by: Andrey Danin danindrey@mail.ru
common/ansi_console.c | 355 +++++++++++++++++++++++++++++++++++++++++++++++++ include/ansi_console.h | 39 ++++++ 2 files changed, 394 insertions(+) create mode 100644 common/ansi_console.c create mode 100644 include/ansi_console.h
[...]
+static void console_putc(struct ansi_console_t *console, const char c) +{
- switch (c) {
- case '\r': /* back to first column */
console_caret_return(console);
break;
- case '\n': /* next line */
console_new_line(console, 1);
break;
- case '\t': /* tab 8 */
COL |= 0x0008;
COL &= ~0x0007;
This seems buggy. Not only does this limit us to one tab, it can potentially move the cursor backwards. The LCD version of COL += 8 seems more correct.
--
Regards,
Nikita Kiryanov