XenevaOS
Loading...
Searching...
No Matches
hid.h
Go to the documentation of this file.
1
30#ifndef __USB_HID_H__
31#define __USB_HID_H__
32
33#include "../xhci.h"
34#include "../usb3.h"
35#include "../xhci_cmd.h"
36
37#define HID_GET_REPORT 0x01
38#define HID_GET_IDLE 0x02
39#define HID_GET_PROTOCOL 0x03
40#define HID_SET_REPORT 0x09
41#define HID_SET_IDLE 0x0A
42#define HID_SET_PROTOCOL 0x0B
43
44#pragma pack(push,1)
45typedef struct _hid_desc_link_ {
47 uint8_t length[2];
49#pragma pack(pop)
50
51#pragma pack(push,1)
52typedef struct _hid_desc_ {
60#pragma pack(pop)
61
62void SetProtocol(USBDevice* dev, XHCISlot* slot, uint8_t slot_id);
63
64/*
65* USBHidInitialise -- initialise the hid device
66* @param dev -- Pointer to USB Device
67* @param slot -- Pointer to current slot
68* @param classC -- class code
69* @param subClassC -- sub class code
70* @param prot -- protocol
71*/
72void USBHidInitialise(USBDevice* dev, XHCISlot* slot, uint8_t classC, uint8_t subClassC, uint8_t prot);
73#endif
struct _hid_desc_ HIDDescriptor
struct _hid_desc_link_ HIDDescriptorLink
void SetProtocol(USBDevice *dev, XHCISlot *slot, uint8_t slot_id)
Definition hid.cpp:139
void USBHidInitialise(USBDevice *dev, XHCISlot *slot, uint8_t classC, uint8_t subClassC, uint8_t prot)
Definition hid.cpp:509
unsigned char uint8_t
Definition acefiex.h:161
unsigned short int uint16_t
Definition acefiex.h:162
Definition hid.h:53
uint8_t bLength
Definition hid.h:54
HIDDescriptorLink links[1]
Definition hid.h:59
uint16_t bcdHID
Definition hid.h:56
uint8_t bDescriptorType
Definition hid.h:55
uint8_t bNumDescriptors
Definition hid.h:58
uint8_t bCountryCode
Definition hid.h:57
Definition usb3.h:40
Definition xhci.h:202