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 #ifndef _PS2_KEYBOARD_H_ 00008 #define _PS2_KEYBOARD_H_ 00009 00010 #include "PS2KB_INIT.h" 00011 #include "PS2KB.h" 00012 00013 class PS2Keyboard { 00014 public: 00015 PS2Keyboard(PinName clk_pin, PinName dat_pin); 00016 ~PS2Keyboard(); 00017 typedef enum { 00018 KeyMake, 00019 KeyBreak 00020 } Type; 00021 typedef struct { 00022 Type type; 00023 int length; 00024 char scancode[8]; 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 Wed Jul 13 2022 15:37:35 by
1.7.2