XenevaOS
Loading...
Searching...
No Matches
usbmouse.h
Go to the documentation of this file.
1//
2// usbmouse.h
3//
4// USPi - An USB driver for Raspberry Pi written in C
5// Copyright (C) 2014-2018 R. Stange <rsta2@o2online.de>
6//
7// This program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19//
20#ifndef _uspi_usbmouse_h
21#define _uspi_usbmouse_h
22
23#include "uspi/usbfunction.h"
24#include "uspi/usbendpoint.h"
25#include "uspi/usbrequest.h"
26#include "uspi/types.h"
27
28#define MOUSE_BOOT_REPORT_SIZE 3
29
30typedef void TMouseStatusHandler (unsigned nButtons, int nDisplacementX, int nDisplacementY);
31
47
48void USBMouseDevice (TUSBMouseDevice *pThis, TUSBFunction *pFunction);
50
51boolean USBMouseDeviceConfigure (TUSBFunction *pUSBFunction);
52
54
55#endif
uint8_t u8
Definition kernel.h:20
uint16_t u16
Definition kernel.h:21
Definition usbendpoint.h:41
Definition usbfunction.h:33
Definition usbmouse.h:33
TMouseStatusHandler * m_pStatusHandler
Definition usbmouse.h:38
TUSBRequest m_URB
Definition usbmouse.h:43
u16 m_usReportDescriptorLength
Definition usbmouse.h:40
u8 * m_pReportBuffer
Definition usbmouse.h:44
TUSBFunction m_USBFunction
Definition usbmouse.h:34
TUSBEndpoint * m_pReportEndpoint
Definition usbmouse.h:36
u8 * m_pHIDReportDescriptor
Definition usbmouse.h:41
Definition usbrequest.h:36
void _CUSBMouseDevice(TUSBMouseDevice *pThis)
Definition usbmouse.c:52
boolean USBMouseDeviceConfigure(TUSBFunction *pUSBFunction)
Definition usbmouse.c:78
void USBMouseDeviceRegisterStatusHandler(TUSBMouseDevice *pThis, TMouseStatusHandler *pStatusHandler)
Definition usbmouse.c:171
void TMouseStatusHandler(unsigned nButtons, int nDisplacementX, int nDisplacementY)
Definition usbmouse.h:30
void USBMouseDevice(TUSBMouseDevice *pThis, TUSBFunction *pFunction)
Definition usbmouse.c:35