XenevaOS
Loading...
Searching...
No Matches
usbgamepad.h
Go to the documentation of this file.
1//
2// usbgamepad.h
3//
4// USPi - An USB driver for Raspberry Pi written in C
5// Copyright (C) 2014-2018 R. Stange <rsta2@o2online.de>
6// Copyright (C) 2014 M. Maccaferri <macca@maccasoft.com>
7//
8// This program is free software: you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation, either version 3 of the License, or
11// (at your option) any later version.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program. If not, see <http://www.gnu.org/licenses/>.
20//
21#ifndef _uspi_usbgamepad_h
22#define _uspi_usbgamepad_h
23
24#include "uspi/usbfunction.h"
25#include "uspi/usbendpoint.h"
26#include "uspi/usbrequest.h"
27#include "uspi/usbhid.h"
28#include "uspi/types.h"
29#include "uspi.h"
30
50
51void USBGamePadDevice (TUSBGamePadDevice *pThis, TUSBFunction *pFunction);
53
54boolean USBGamePadDeviceConfigure (TUSBFunction *pUSBFunction);
55
58
59#endif
uint8_t u8
Definition kernel.h:20
uint16_t u16
Definition kernel.h:21
Definition usbendpoint.h:41
Definition usbfunction.h:33
Definition usbgamepad.h:32
unsigned m_nDeviceIndex
Definition usbgamepad.h:34
u16 m_usReportDescriptorLength
Definition usbgamepad.h:42
TGamePadStatusHandler * m_pStatusHandler
Definition usbgamepad.h:40
TUSBFunction m_USBFunction
Definition usbgamepad.h:33
TUSBRequest m_URB
Definition usbgamepad.h:45
TUSBEndpoint * m_pEndpointOut
Definition usbgamepad.h:37
USPiGamePadState m_State
Definition usbgamepad.h:39
TUSBEndpoint * m_pEndpointIn
Definition usbgamepad.h:36
u8 * m_pReportBuffer
Definition usbgamepad.h:46
u16 m_nReportSize
Definition usbgamepad.h:47
u8 * m_pHIDReportDescriptor
Definition usbgamepad.h:43
Definition usbrequest.h:36
Definition uspi.h:162
void USBGamePadDevice(TUSBGamePadDevice *pThis, TUSBFunction *pFunction)
Definition usbgamepad.c:84
void USBGamePadDeviceRegisterStatusHandler(TUSBGamePadDevice *pThis, TGamePadStatusHandler *pStatusHandler)
Definition usbgamepad.c:452
void USBGamePadDeviceGetReport(TUSBGamePadDevice *pThis)
Definition usbgamepad.c:496
void _CUSBGamePadDevice(TUSBGamePadDevice *pThis)
Definition usbgamepad.c:116
boolean USBGamePadDeviceConfigure(TUSBFunction *pUSBFunction)
Definition usbgamepad.c:336
void TGamePadStatusHandler(unsigned nDeviceIndex, const USPiGamePadState *pGamePadState)
Definition uspi.h:182