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.
PS2.h
00001 /** 00002 * PS/2 interface control class (Version 0.0.1) 00003 * 00004 * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems) 00005 * http://shinta.main.jp/ 00006 */ 00007 00008 #ifndef _PS2_H_ 00009 #define _PS2_H_ 00010 00011 #include "mbed.h" 00012 00013 /** 00014 * PS/2 interface control class. 00015 */ 00016 class PS2 { 00017 public: 00018 /** 00019 * Create. 00020 * 00021 * @param clk_pin Clock pin. 00022 * @param dat_pin Data pin. 00023 */ 00024 PS2(PinName clk_pin, PinName dat_pin); 00025 00026 /** 00027 * Destory. 00028 */ 00029 virtual ~PS2(); 00030 00031 /** 00032 * Get a data from a PS/2 device. 00033 * 00034 * @return A data from a PS/2 device. 00035 */ 00036 virtual int getc(void) = 0; 00037 00038 /** 00039 * Set timeout. 00040 * 00041 * @param ms Timeout ms. 00042 */ 00043 virtual void setTimeout(int ms) = 0; 00044 }; 00045 00046 #endif
Generated on Wed Jul 20 2022 18:12:36 by
