Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of PS2 by
Diff: PS2Keyboard.cpp
- Revision:
- 1:f290d8dc0afc
- Parent:
- 0:62b62530a82f
--- a/PS2Keyboard.cpp Thu Oct 11 20:15:09 2012 +0000
+++ b/PS2Keyboard.cpp Fri Jan 24 09:47:28 2014 +0000
@@ -7,15 +7,26 @@
#include "PS2Keyboard.h"
PS2Keyboard::PS2Keyboard(PinName clk_pin, PinName dat_pin)
- : ps2kb_init(clk_pin, dat_pin), ps2kb(clk_pin, dat_pin) {
+ : ps2kb_init(clk_pin, dat_pin), ps2kb(clk_pin, dat_pin)
+{
+}
+
+PS2Keyboard::~PS2Keyboard()
+{
}
-PS2Keyboard::~PS2Keyboard() {
-}
-
-bool PS2Keyboard::processing(keyboard_event_t *p) {
+bool PS2Keyboard::processing(keyboard_event_t *p)
+{
bool emit = false;
const int c = ps2kb.getc();
+
+ char str[10];
+ // if(c != -1) {
+ // sprintf(str,"GOT: %X",c);
+ // printf(str);
+ // }
+
+
if (0 <= c) {
scancode[count++] = c;
switch (count) {
