A project to implement a console using the Mbed using VGA for video output and a PS/2 keyboard for the input. The eventual goal is to also include tools for managing SD cards, and a semi-self-hosting programming environment.
Dependencies: PS2_MbedConsole fastlib SDFileSystem vga640x480g_mbedconsole lightvm mbed
MbedConsole is a cool little project to have a self-contained computer all on an Mbed. So far it has VGA and PS/2 support and can stand alone without a computer powering it. Next planned features are SD card support and a lightweight programmable VM complete with a file editor and self-hosted assembler.
You can view additional details about it at http://earlz.net/tags/mbedconsole
Diff: shell.cpp
- Revision:
- 10:bda85442b674
- Parent:
- 9:4211d638b2e9
- Child:
- 12:3ee3062cc11c
--- a/shell.cpp Wed Sep 26 04:12:57 2012 +0000 +++ b/shell.cpp Wed Sep 26 05:22:44 2012 +0000 @@ -1,7 +1,7 @@ #include "mbedconsole.h" #include "plEarlz.h" #include "PS2Keyboard.h" - +char kbd_GetKey(); LocalFileSystem local("local"); void shell_begin(){ @@ -45,16 +45,8 @@ // Drive should be restored. this is the same as just returning from main wait(5); }else if(strlcmp(cmd, "test2", 6)==0){ - PS2Keyboard::keyboard_event_t evt_kb; - while (1) { - //serial.putc('.'); - if (ps2kb->processing(&evt_kb)) { - console.printf("[%d]:", evt_kb.type); - for (int i = 0; i < evt_kb.length; i++) { - console.printf("%02x ", evt_kb.scancode[i]); - } - console.printf("\r\n"); - } + while(1){ + vputc(kbd_GetKey()); } }else if(strlcmp(cmd, "plearlz", 8)==0){ valid=1;