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.
Fork of PS2 by
PS2Keyboard.h
- Committer:
- pprasad7
- Date:
- 2012-10-11
- Revision:
- 0:62b62530a82f
File content as of revision 0:62b62530a82f:
/**
* PS/2 keyboard interface control class (Version 0.0.1)
*
* Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
* http://shinta.main.jp/
*/
#ifndef _PS2_KEYBOARD_H_
#define _PS2_KEYBOARD_H_
#include "PS2KB_INIT.h"
#include "PS2KB.h"
class PS2Keyboard {
public:
PS2Keyboard(PinName clk_pin, PinName dat_pin);
~PS2Keyboard();
typedef enum {
KeyMake,
KeyBreak
} Type;
typedef struct {
Type type;
int length;
char scancode[8];
} keyboard_event_t;
bool processing(keyboard_event_t *p);
private:
PS2KB_INIT ps2kb_init;
PS2KB ps2kb;
int count;
char scancode[8];
};
#endif
