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.
PS2Keyboard.h
00001 /** 00002 * PS/2 keyboard interface control class (Version 0.0.1) 00003 * 00004 * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems) 00005 * http://shinta.main.jp/ 00006 * 00007 * modified by pilzm 00008 */ 00009 #ifndef _PS2_KEYBOARD_H_ 00010 #define _PS2_KEYBOARD_H_ 00011 00012 #include "PS2KB_INIT.h" 00013 #include "PS2KB.h" 00014 00015 class PS2Keyboard { 00016 public: 00017 PS2Keyboard(PinName clk_pin, PinName dat_pin); 00018 ~PS2Keyboard(); 00019 typedef enum { 00020 KeyMake, 00021 KeyBreak 00022 } Type; 00023 typedef struct { 00024 int scancode; 00025 } keyboard_event_t; 00026 bool processing(keyboard_event_t *p); 00027 private: 00028 PS2KB_INIT ps2kb_init; 00029 PS2KB ps2kb; 00030 int count; 00031 char scancode[8]; 00032 }; 00033 00034 #endif
Generated on Fri Jul 15 2022 10:09:06 by
1.7.2