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:
- 9:4211d638b2e9
- Parent:
- 3:2bc2b0dce10e
- Child:
- 10:bda85442b674
--- a/shell.cpp Sat Sep 22 04:14:01 2012 +0000 +++ b/shell.cpp Wed Sep 26 04:12:57 2012 +0000 @@ -1,5 +1,6 @@ #include "mbedconsole.h" #include "plEarlz.h" +#include "PS2Keyboard.h" LocalFileSystem local("local"); @@ -43,6 +44,18 @@ // 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"); + } + } }else if(strlcmp(cmd, "plearlz", 8)==0){ valid=1; pl_shell();