From 153e90541172c794b86c0f5c8da5dd84aec79e94 Mon Sep 17 00:00:00 2001 From: Peter Weingartner Date: Thu, 4 Jul 2024 16:56:47 -0400 Subject: [PATCH] Reconnected console driver --- src/dev/console.c | 6 ++++++ src/toolbox.c | 18 ++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/dev/console.c b/src/dev/console.c index 2e8438f..91411a3 100644 --- a/src/dev/console.c +++ b/src/dev/console.c @@ -19,7 +19,13 @@ #include "dev/channel.h" #include "dev/console.h" #include "dev/ps2.h" + +#if MODEL == MODEL_FOENIX_A2560K #include "dev/kbd_mo.h" +#elif MODEL == MODEL_FOENIX_F256K +#include "dev/kbd_f256k.h" +#endif + #include "dev/txt_screen.h" #include "simpleio.h" diff --git a/src/toolbox.c b/src/toolbox.c index 0060bc4..dd4fba8 100644 --- a/src/toolbox.c +++ b/src/toolbox.c @@ -169,11 +169,11 @@ void initialize() { bdev_init_system(); // Initialize the channel device system INFO("Block device system ready."); - // if ((res = con_install())) { - // log_num(LOG_ERROR, "FAILED: Console installation", res); - // } else { - // INFO("Console installed."); - // } + if ((res = con_install())) { + log_num(LOG_ERROR, "FAILED: Console installation", res); + } else { + INFO("Console installed."); + } // /* Initialize the timers the MCP uses */ // timers_init(); @@ -286,15 +286,13 @@ int main(int argc, char * argv[]) { initialize(); - printf("Hello, world!\n"); - printf("This is a test.\n"); - kbd_init(); printf("\n> "); + chan_ioctrl(0, CON_IOCTRL_ECHO_OFF, 0, 0); while (!kbd_break()) { - char c = kbd_getc(); + char c = chan_read_b(0); if (c != 0) { - txt_put(0, c); + chan_write_b(0, c); } }