mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-07 21:04:00 +02:00
Add current version of mbed code as stored at mbed.org
This commit is contained in:
parent
9a712ec12c
commit
ddb1399f9a
7 changed files with 155 additions and 1 deletions
34
mbed/PS2Keyboard.h
Normal file
34
mbed/PS2Keyboard.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef __PS2KEYBOARD_H__
|
||||
#define __PS2KEYBOARD_H__
|
||||
|
||||
#include "mbed.h"
|
||||
|
||||
class PS2Keyboard {
|
||||
public:
|
||||
PS2Keyboard();
|
||||
unsigned char read(void);
|
||||
protected:
|
||||
DigitalInOut _ps2clk;
|
||||
DigitalIn _ps2din;
|
||||
};
|
||||
|
||||
static const unsigned char ps2KeyMap[] =
|
||||
" ` " // 0
|
||||
" Q1 ZSAW2 " // 1
|
||||
" CXDE43 VFTR5 " // 2
|
||||
" NBHGY6 MJU78 " // 3
|
||||
" ,KIO09 ./L;P- " // 4
|
||||
" \' [= !] \\ " // 5
|
||||
" 1 47 1" // 6
|
||||
"0.2568 +3-*9 " // 7
|
||||
" " // 8
|
||||
" " // 9
|
||||
" " // A
|
||||
" " // B
|
||||
" " // C
|
||||
" " // D
|
||||
"\xE0 " // E
|
||||
"\xF0 " // F
|
||||
;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue