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.
Dependents: Synth Lab3Translator PS2_Keyboard CLI ... more
PS2.h
- Committer:
- shintamainjp
- Date:
- 2010-09-29
- Revision:
- 1:823c2798e398
- Parent:
- 0:7ee6afa15d51
File content as of revision 1:823c2798e398:
/**
* PS/2 interface control class (Version 0.0.1)
*
* Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
* http://shinta.main.jp/
*/
#ifndef _PS2_H_
#define _PS2_H_
#include "mbed.h"
/**
* PS/2 interface control class.
*/
class PS2 {
public:
/**
* Create.
*
* @param clk_pin Clock pin.
* @param dat_pin Data pin.
*/
PS2(PinName clk_pin, PinName dat_pin);
/**
* Destory.
*/
virtual ~PS2();
/**
* Get a data from a PS/2 device.
*
* @return A data from a PS/2 device.
*/
virtual int getc(void) = 0;
/**
* Set timeout.
*
* @param ms Timeout ms.
*/
virtual void setTimeout(int ms) = 0;
};
#endif