pl050mouse.hpp

来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· HPP 代码 · 共 57 行

HPP
57
字号
/* -*-C-*-
 *
 * $Revision: 1.3 $
 *   $Author: kwelton $
 *     $Date: 2000/06/14 03:38:22 $
 *
 * 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.
 *
 * Copyright (c) 1995-1998  Microsoft Corporation
 * Copyright (c) 2000 ARM Limited
 * All Rights Reserved
 */

#ifndef integrator_pl050mouse_hpp
#define integrator_pl050mouse_hpp

#include <windows.h>

extern "C" unsigned int MouseISRUpcall(bool timedout, unsigned int scancode);
extern "C" DWORD pl050MouseIsrThread(void);

class pl050Port;

class pl050Mouse
{
    pl050Port *m_pp2p;
    HANDLE m_hevInterrupt;
    UINT8 m_ui8ButtonState;

    /*
     * these used to be autos in the ISR loop; now that they need
     * to be statics in the upcall, it's more efficient to put
     * them in the class
     */
    int cBytes;
    signed char buf[4];
    bool bInPacket;

    // this depends on the presence of an IntelliMouse(R)
    BYTE m_cReportFormatLength;

  public:
    bool Initialise(pl050Port *pp2p);
    bool IsrThreadStart(void);
    bool IsrThreadProc(void);

    friend unsigned int MouseISRUpcall(bool timedout, unsigned int scancode);
    friend DWORD pl050MouseIsrThread(void);
};

#endif /* ndef integrator_pl050mouse_hpp */

/* EOF pl050mouse.hpp */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?