📄 pl050port.cpp
字号:
//
// 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-*-
*
* 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.cpp,v
* Revision: 1.1
* ----------------------------------------------------------------
* $
*/
#include <windows.h>
#include <winbase.h>
#include <ceddk.h>
#include <keybddbg.h>
#include "oalintr.h"
#include "pl050port.hpp"
/*
static const unsigned int msPollLimit = 5000; // 5 seconds.
static const unsigned int crForceClockLow = (1 << 0);
static const unsigned int crForceDataLow = (1 << 1);
static const unsigned int crEnableIf = (1 << 2);
static const unsigned int crEnableTxInt = (1 << 3);
static const unsigned int crEnableRxInt = (1 << 4);
static const unsigned int crNoLineControl = (1 << 5);
static const unsigned int pl050KMID = (1 << 0);
static const unsigned int pl050KMIC = (1 << 1);
static const unsigned int statRxParity = (1 << 2);
static const unsigned int statRxBusy = (1 << 3);
static const unsigned int statRxFull = (1 << 4);
static const unsigned int statTxBusy = (1 << 5);
static const unsigned int statTxEmpty = (1 << 6);
static const unsigned int pl050ClockDivisor = 0x02;
static const unsigned int iirRxInt = (1 << 0);
static const unsigned int iirTxInt = (1 << 1);
static const unsigned char cmdKeybdReset = 0xff;
static const unsigned char cmdKeybdMode = 0xf0;
static const unsigned char cmdKeybdLights = 0xed;
static const unsigned char cmdMouseReadId = 0xf2;
static const unsigned char cmdMouseSetReportRate = 0xf3;
static const int responseACK = 0xfa;
static const int responseToReset = 0xaa;
static const unsigned char MouseIdIntelliMouse = 0x03;
*/
/*
* flags for buffered commands
*/
//static const unsigned int CommandHasACK = (1 << 8);
/**********************************************************************/
/*
* public functions
*/
/*
* initialise the interface. we deliberately anglicise the spelling
* 'cause the function has changed from the usoft original (it now
* takes no args, rather than an unsigned int).
*/
bool pl050Port::Initialise()
{
nLocks = 0;
intelliMouseFound = false;
portupcall = NULL;
parityfailed = false;
awaitingACK = false;
commandslocked = false;
irqsenabled = false;
//yz_add
//wake from keybd
{
DWORD dwTransferred = 0;
portintr = SYSINTR_KBD;
KernelIoControl(IOCTL_HAL_ENABLE_WAKE, &portintr, sizeof(portintr),
NULL, 0, &dwTransferred);
}
return true;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -