Reconnected console driver
This commit is contained in:
parent
437ba285bf
commit
153e905411
|
@ -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"
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue