XenevaOS
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
usbgamepad.c File Reference
#include "uspi/usbgamepad.h"
#include "uspi/usbhostcontroller.h"
#include "uspi/devicenameservice.h"
#include "uspi/assert.h"
#include "uspi/util.h"
#include "uspios.h"
Include dependency graph for usbgamepad.c:

Macros

#define HID_USAGE_PAGE   0x04
 
#define HID_USAGE   0x08
 
#define HID_COLLECTION   0xA0
 
#define HID_END_COLLECTION   0xC0
 
#define HID_REPORT_COUNT   0x94
 
#define HID_REPORT_SIZE   0x74
 
#define HID_USAGE_MIN   0x18
 
#define HID_USAGE_MAX   0x28
 
#define HID_LOGICAL_MIN   0x14
 
#define HID_LOGICAL_MAX   0x24
 
#define HID_PHYSICAL_MIN   0x34
 
#define HID_PHYSICAL_MAX   0x44
 
#define HID_INPUT   0x80
 
#define HID_REPORT_ID   0x84
 
#define HID_OUTPUT   0x90
 
#define HID_USAGE_PAGE_GENERIC_DESKTOP   0x01
 
#define HID_USAGE_PAGE_KEY_CODES   0x07
 
#define HID_USAGE_PAGE_LEDS   0x08
 
#define HID_USAGE_PAGE_BUTTONS   0x09
 
#define HID_USAGE_POINTER   0x01
 
#define HID_USAGE_MOUSE   0x02
 
#define HID_USAGE_JOYSTICK   0x04
 
#define HID_USAGE_GAMEPAD   0x05
 
#define HID_USAGE_KEYBOARD   0x06
 
#define HID_USAGE_X   0x30
 
#define HID_USAGE_Y   0x31
 
#define HID_USAGE_Z   0x32
 
#define HID_USAGE_RX   0x33
 
#define HID_USAGE_RY   0x34
 
#define HID_USAGE_RZ   0x35
 
#define HID_USAGE_SLIDER   0x36
 
#define HID_USAGE_WHEEL   0x38
 
#define HID_USAGE_HATSWITCH   0x39
 
#define HID_COLLECTION_PHYSICAL   0
 
#define HID_COLLECTION_APPLICATION   1
 
#define HID_ITEM_CONSTANT   0x1
 
#define HID_ITEM_VARIABLE   0x2
 
#define HID_ITEM_RELATIVE   0x4
 
#define UNDEFINED   -123456789
 

Enumerations

enum  {
  None = 0 , GamePad , GamePadButton , GamePadAxis ,
  GamePadHat
}
 

Functions

void USBGamePadDevice (TUSBGamePadDevice *pThis, TUSBFunction *pDevice)
 
void _CUSBGamePadDevice (TUSBGamePadDevice *pThis)
 
boolean USBGamePadDeviceConfigure (TUSBFunction *pUSBFunction)
 
void USBGamePadDeviceRegisterStatusHandler (TUSBGamePadDevice *pThis, TGamePadStatusHandler *pStatusHandler)
 
void USBGamePadDeviceGetReport (TUSBGamePadDevice *pThis)
 

Macro Definition Documentation

◆ HID_COLLECTION

#define HID_COLLECTION   0xA0

◆ HID_COLLECTION_APPLICATION

#define HID_COLLECTION_APPLICATION   1

◆ HID_COLLECTION_PHYSICAL

#define HID_COLLECTION_PHYSICAL   0

◆ HID_END_COLLECTION

#define HID_END_COLLECTION   0xC0

◆ HID_INPUT

#define HID_INPUT   0x80

◆ HID_ITEM_CONSTANT

#define HID_ITEM_CONSTANT   0x1

◆ HID_ITEM_RELATIVE

#define HID_ITEM_RELATIVE   0x4

◆ HID_ITEM_VARIABLE

#define HID_ITEM_VARIABLE   0x2

◆ HID_LOGICAL_MAX

#define HID_LOGICAL_MAX   0x24

◆ HID_LOGICAL_MIN

#define HID_LOGICAL_MIN   0x14

◆ HID_OUTPUT

#define HID_OUTPUT   0x90

◆ HID_PHYSICAL_MAX

#define HID_PHYSICAL_MAX   0x44

◆ HID_PHYSICAL_MIN

#define HID_PHYSICAL_MIN   0x34

◆ HID_REPORT_COUNT

#define HID_REPORT_COUNT   0x94

◆ HID_REPORT_ID

#define HID_REPORT_ID   0x84

◆ HID_REPORT_SIZE

#define HID_REPORT_SIZE   0x74

◆ HID_USAGE

#define HID_USAGE   0x08

◆ HID_USAGE_GAMEPAD

#define HID_USAGE_GAMEPAD   0x05

◆ HID_USAGE_HATSWITCH

#define HID_USAGE_HATSWITCH   0x39

◆ HID_USAGE_JOYSTICK

#define HID_USAGE_JOYSTICK   0x04

◆ HID_USAGE_KEYBOARD

#define HID_USAGE_KEYBOARD   0x06

◆ HID_USAGE_MAX

#define HID_USAGE_MAX   0x28

◆ HID_USAGE_MIN

#define HID_USAGE_MIN   0x18

◆ HID_USAGE_MOUSE

#define HID_USAGE_MOUSE   0x02

◆ HID_USAGE_PAGE

#define HID_USAGE_PAGE   0x04

◆ HID_USAGE_PAGE_BUTTONS

#define HID_USAGE_PAGE_BUTTONS   0x09

◆ HID_USAGE_PAGE_GENERIC_DESKTOP

#define HID_USAGE_PAGE_GENERIC_DESKTOP   0x01

◆ HID_USAGE_PAGE_KEY_CODES

#define HID_USAGE_PAGE_KEY_CODES   0x07

◆ HID_USAGE_PAGE_LEDS

#define HID_USAGE_PAGE_LEDS   0x08

◆ HID_USAGE_POINTER

#define HID_USAGE_POINTER   0x01

◆ HID_USAGE_RX

#define HID_USAGE_RX   0x33

◆ HID_USAGE_RY

#define HID_USAGE_RY   0x34

◆ HID_USAGE_RZ

#define HID_USAGE_RZ   0x35

◆ HID_USAGE_SLIDER

#define HID_USAGE_SLIDER   0x36

◆ HID_USAGE_WHEEL

#define HID_USAGE_WHEEL   0x38

◆ HID_USAGE_X

#define HID_USAGE_X   0x30

◆ HID_USAGE_Y

#define HID_USAGE_Y   0x31

◆ HID_USAGE_Z

#define HID_USAGE_Z   0x32

◆ UNDEFINED

#define UNDEFINED   -123456789

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
None 
GamePad 
GamePadButton 
GamePadAxis 
GamePadHat 

Function Documentation

◆ _CUSBGamePadDevice()

void _CUSBGamePadDevice ( TUSBGamePadDevice pThis)

◆ USBGamePadDevice()

void USBGamePadDevice ( TUSBGamePadDevice pThis,
TUSBFunction pDevice 
)

◆ USBGamePadDeviceConfigure()

boolean USBGamePadDeviceConfigure ( TUSBFunction pUSBFunction)

◆ USBGamePadDeviceGetReport()

void USBGamePadDeviceGetReport ( TUSBGamePadDevice pThis)

◆ USBGamePadDeviceRegisterStatusHandler()

void USBGamePadDeviceRegisterStatusHandler ( TUSBGamePadDevice pThis,
TGamePadStatusHandler pStatusHandler 
)