2013-06-26 22:58:41 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: GPL - See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Virtual DOS Machine
|
|
|
|
* FILE: ps2.h
|
2013-12-24 15:53:30 +00:00
|
|
|
* PURPOSE: PS/2 controller emulation
|
2013-06-26 22:58:41 +00:00
|
|
|
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PS2_H_
|
|
|
|
#define _PS2_H_
|
|
|
|
|
|
|
|
/* INCLUDES *******************************************************************/
|
|
|
|
|
|
|
|
#include "ntvdm.h"
|
|
|
|
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
|
|
|
|
#define KEYBOARD_BUFFER_SIZE 32
|
|
|
|
#define PS2_DATA_PORT 0x60
|
|
|
|
#define PS2_CONTROL_PORT 0x64
|
|
|
|
#define PS2_DEFAULT_CONFIG 0x05
|
|
|
|
#define KEYBOARD_ACK 0xFA
|
|
|
|
#define KEYBOARD_RESEND 0xFE
|
|
|
|
|
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
|
2013-11-26 20:20:51 +00:00
|
|
|
BOOLEAN PS2Initialize(HANDLE ConsoleInput);
|
|
|
|
VOID PS2Cleanup(VOID);
|
2013-12-06 04:35:58 +00:00
|
|
|
BYTE WINAPI PS2ReadPort(ULONG Port);
|
|
|
|
VOID WINAPI PS2WritePort(ULONG Port, BYTE Data);
|
|
|
|
VOID GenerateKeyboardInterrupts(VOID);
|
2013-06-26 22:58:41 +00:00
|
|
|
|
2013-08-09 18:55:35 +00:00
|
|
|
#endif // _PS2_H_
|
|
|
|
|
|
|
|
/* EOF */
|