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.
PS2Kbd.h
00001 #ifndef PS2KBD_H 00002 #define PS2KBD_H 00003 00004 #include "mbed.h" 00005 00006 class PS2Kbd { 00007 00008 public: 00009 00010 PS2Kbd(PinName clk, PinName din); 00011 unsigned char rd(void); 00012 void wr(unsigned char); 00013 00014 protected: 00015 DigitalInOut _ps2clk; 00016 DigitalInOut _ps2din; 00017 00018 }; 00019 00020 00021 static const unsigned char ps2KeyMap[] = { 00022 // 0 1 2 3 4 5 6 7 8 9 A B C D E F 00023 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '`', ' ', // 00-0F 00024 ' ', ' ', 0x12, ' ', ' ', 'q', '1', ' ', ' ', ' ', 'z', 's', 'a', 'w', '2', ' ', // 10-1F 00025 ' ', 'c', 'x', 'd', 'e', '4', '3', ' ', ' ', ' ', 'v', 'f', 't', 'r', '5', ' ', // 20-2F 00026 ' ', 'n', 'b', 'h', 'g', 'y', '6', ' ', ' ', ' ', 'm', 'j', 'u', '7', '8', ' ', // 30-3F 00027 ' ', ',', 'k', 'i', 'o', '0', '9', ' ', ' ', '.', '/', 'l', ';', 'p', '-', ' ', // 40-4F 00028 ' ', ' ','\'', ' ', '[', '=', ' ', ' ', 0x58, 0x59, 0x5A, ']', ' ','\\', ' ', ' ', // 50-5F 00029 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '1', ' ', '4', '7', ' ', ' ', '1', // 60-6F 00030 '0', '.', '2', '5', '6', '8', 0x1B, 0x80, ' ', '+', '3', '-', '*', '9', ' ', ' ', // 70-7F 00031 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 80-8F 00032 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 90-9F 00033 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // A0-AF 00034 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // B0-BF 00035 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // C0-CF 00036 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // D0-DF 00037 0xE0, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // E0-EF 00038 NULL, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // F0-FF 00039 }; 00040 00041 #endif
Generated on Fri Jul 15 2022 08:05:20 by
1.7.2