X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FUSB%2FHID%2Fhid_reports.h;fp=KernelLand%2FModules%2FUSB%2FHID%2Fhid_reports.h;h=fa464514968d7f45e7747c114a10673e38807619;hb=1ba64c63a4a3a8ce27155f9463f0442ea7f7dc89;hp=0000000000000000000000000000000000000000;hpb=8bfd42a027bc3332c06c93216ae6aaea02cb4126;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/USB/HID/hid_reports.h b/KernelLand/Modules/USB/HID/hid_reports.h new file mode 100644 index 00000000..fa464514 --- /dev/null +++ b/KernelLand/Modules/USB/HID/hid_reports.h @@ -0,0 +1,75 @@ +/* + * Acess2 USB Stack - HID Driver + * - By John Hodge (thePowersGang) + * + * hid_reports.h + * - Report parsing definitions + */ +#ifndef _USB_HID_REPORTS_H_ +#define _USB_HID_REPORTS_H_ + +#include + +typedef struct sHID_ReportCallbacks tHID_ReportCallbacks; +typedef struct sHID_ReportGlobalState tHID_ReportGlobalState; +typedef struct sHID_ReportLocalState tHID_ReportLocalState; + +struct sHID_ReportCallbacks +{ + void (*Input)( + tUSBInterface *Dev, + tHID_ReportGlobalState *Global, tHID_ReportLocalState *Local, Uint32 Data + ); + void (*Output)( + tUSBInterface *Dev, + tHID_ReportGlobalState *Global, tHID_ReportLocalState *Local, Uint32 Data + ); + void (*Feature)( + tUSBInterface *Dev, + tHID_ReportGlobalState *Global, tHID_ReportLocalState *Local, Uint32 Data + ); + + tHID_ReportCallbacks *(*Collection)( + tUSBInterface *Dev, + tHID_ReportGlobalState *Global, tHID_ReportLocalState *Local, Uint32 Data + ); + + void (*EndCollection)(tUSBInterface *Dev); +}; + +struct sHID_ReportGlobalState +{ + Uint32 UsagePage; + Uint32 LogMin; + Uint32 LogMax; + Uint32 PhysMin; + Uint32 PhysMax; + + Uint8 UnitExp; + Uint8 Unit; + + Uint32 ReportSize; + Uint32 ReportID; + Uint32 ReportCount; +}; + +struct sHID_IntList +{ + int Space; + int nItems; + Uint32 *Items; +}; + +struct sHID_ReportLocalState +{ + struct sHID_IntList Usages; + Uint32 UsageMin; + struct sHID_IntList Designators; + Uint32 DesignatorMin; + struct sHID_IntList Strings; + Uint32 StringMin; + +}; + +#endif +