📄 pl050port.hpp
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/* -*-C-*-
*
* pl050kbd:
*
* Keyboard driver for PrimeCell Keyboard PS/2 port as implemented on
* the Dev board. This is heavily based upon (i.e. has the same
* public class interface as) the Microsoft driver from the HARP code
* drop.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
* Release Status:OS005-SW-70002-r0p0-00REL0
* $Copyright:
* ----------------------------------------------------------------
* This confidential and proprietary software may be used only as
* authorised by a licensing agreement from ARM Limited
* (C) COPYRIGHT 2004 ARM Limited
* ALL RIGHTS RESERVED
* The entire notice above must be reproduced on all authorised
* copies and copies may only be made to the extent permitted
* by a licensing agreement from ARM Limited.
* ----------------------------------------------------------------
* File: pl050port.hpp,v
* Revision: 1.2
* ----------------------------------------------------------------
* $
*/
#ifndef _pl050port_hpp
#define _pl050port_hpp
#include <windows.h>
#include "ringbuf.hpp"
typedef enum
{
pl050PortNone,
pl050PortKbd,
pl050PortMouse
} pl050PortType;
typedef unsigned int pl050ISRUpcall(bool timedout, unsigned int scancode);
class pl050Port
{
unsigned int portbase;
unsigned int portintr;
pl050PortType porttype;
int nLocks;
bool intelliMouseFound;
bool irqsenabled;
RingBuf commands;
bool awaitingACK;
bool parityfailed;
bool commandslocked;
pl050ISRUpcall *portupcall;
public:
bool Initialise();
inline void SetISRUpcall(pl050ISRUpcall *upcall)
{
portupcall = upcall;
}
void ISRLoop(unsigned int timeout, const TCHAR *szKey);
};
#endif /* ndef _pl050port_hpp */
/* EOF pl050port.hpp */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -