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.cpp
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 #include "PS2Keyboard.h" 00010 00011 PS2Keyboard::PS2Keyboard(PinName clk_pin, PinName dat_pin) 00012 : ps2kb_init(clk_pin, dat_pin), ps2kb(clk_pin, dat_pin) { 00013 } 00014 00015 PS2Keyboard::~PS2Keyboard() { 00016 } 00017 00018 bool PS2Keyboard::processing(keyboard_event_t *p) { 00019 bool emit = true; 00020 int sc = ps2kb.getc(); 00021 if (0 <= sc) { 00022 p->scancode=sc; 00023 } 00024 return emit; 00025 }
Generated on Fri Jul 15 2022 10:09:06 by
1.7.2