49 #define HIDINTERFACE_SIZE (9) 56 #define HIDINENDPOINT_SIZE (7) 63 #define HIDOUTENDPOINT_SIZE (7) 70 #define HIDDESCRIPTOR_SIZE (9) 80 #define COMPOSITE_DHID_SIZE (HIDINTERFACE_SIZE + HIDINENDPOINT_SIZE + \ 81 HIDOUTENDPOINT_SIZE + HIDDESCRIPTOR_SIZE) 103 #define UsagePage(ui8Value) 0x05, ((ui8Value) & 0xff) 120 #define UsagePageVendor(ui16Value) 0x06, ((ui16Value) & 0xFF), \ 121 (((ui16Value) >> 8) & 0xFF) 135 #define Usage(ui8Value) 0x09, ((ui8Value) & 0xff) 151 #define UsageVendor(ui16Value) 0x0A, ((ui16Value) & 0xFF), \ 152 (((ui16Value) >> 8) & 0xFF) 168 #define UsageMinimum(ui8Value) 0x19, ((ui8Value) & 0xff) 184 #define UsageMaximum(ui8Value) 0x29, ((ui8Value) & 0xff) 200 #define LogicalMinimum(i8Value) 0x15, ((i8Value) & 0xff) 216 #define LogicalMaximum(i8Value) 0x25, ((i8Value) & 0xff) 218 #define LogicalMinimum16(i8Value, i8Value1) 0x16, i8Value, i8Value1 219 #define LogicalMaximum16(i8Value, i8Value1) 0x26, i8Value, i8Value1 221 #define LogicalMaximum32(i8Value, i8Value1, i8Value2, i8Value3) 0x17, \ 222 i8Value, i8Value1, i8Value2, i8Value3 239 #define PhysicalMinimum(i16Value) \ 240 0x36, ((i16Value) & 0xFF), \ 241 (((i16Value) >> 8) & 0xFF) 259 #define PhysicalMaximum(i16Value) \ 260 0x46, ((i16Value) & 0xFF), \ 261 (((i16Value) >> 8) & 0xFF) 278 #define Collection(ui8Value) 0xa1, ((ui8Value) & 0xff) 293 #define EndCollection 0xc0 309 #define ReportCount(ui8Value) 0x95, ((ui8Value) & 0xff) 325 #define ReportID(ui8Value) 0x85, ((ui8Value) & 0xff) 342 #define ReportSize(ui8Value) 0x75, ((ui8Value) & 0xff) 361 #define Input(ui8Value) 0x81, ((ui8Value) & 0xff) 381 #define Input2(ui16Value) 0x82, ((ui16Value) & 0xff), \ 382 (((ui16Value) >> 8) & 0xFF) 401 #define Feature(ui8Value) 0xB1, ((ui8Value) & 0xff) 421 #define Feature2(ui16Value) 0xB2, ((ui16Value) & 0xff), \ 422 (((ui16Value) >> 8) & 0xFF) 441 #define Output(ui8Value) 0x91, ((ui8Value) & 0xff) 461 #define Output2(ui16Value) 0x92, ((ui16Value) & 0xff), \ 462 (((ui16Value) >> 8) & 0xFF) 479 #define UnitExponent(i8Value) 0x55, ((i8Value) & 0x0f) 498 #define Unit(ui32Value) 0x67, (ui32Value & 0xFF), \ 499 (((ui32Value) >> 8) & 0xFF), \ 500 (((ui32Value) >> 16) & 0xFF), \ 501 (((ui32Value) >> 24) & 0xFF) 508 #define UnitDistance_cm 0x66, 0x11, 0x00 515 #define UnitDistance_i 0x66, 0x13, 0x00 522 #define UnitRotation_deg 0x66, 0x14, 0x00 529 #define UnitRotation_rad 0x66, 0x12, 0x00 536 #define UnitMass_g 0x66, 0x01, 0x01 543 #define UnitTime_s 0x66, 0x01, 0x10 551 #define UnitTemp_K 0x67, 0x01, 0x00, 0x01, 0x00 559 #define UnitTemp_F 0x67, 0x03, 0x00, 0x01, 0x00 567 #define UnitVelocitySI 0x66, 0x11, 0xF0 575 #define UnitMomentumSI 0x66, 0x11, 0xF1 583 #define UnitAccelerationSI 0x66, 0x11, 0xE0 591 #define UnitForceSI 0x66, 0x11, 0xE1 599 #define UnitEnergySI 0x66, 0x21, 0xE1 607 #define UnitAngAccelerationSI 0x66, 0x12, 0xE0 614 #define UnitVoltage 0x67, 0x21, 0xD1, 0xF0, 0x00 621 #define UnitCurrent_A 0x67, 0x01, 0x00, 0x10, 0x00 623 #define HidUsageSensorPropertyReportingState 0x0A, 0x16, 0x03 624 #define HidUsageSensorPropertySensorStatus 0x0A, 0x03, 0x03 625 #define HidUsageSensorPropertyReportInterval 0x0A, 0x0E, 0x03 626 #define HidUsageSensorData(a, b, c, d) a, b, (c|d) 627 #define HidUsageSensorEvent 0x0A, 0x02, 0x02 628 #define HidUsageSensorDataEnvironmentalTemperature 0x0A, 0x34, 0x04 629 #define HidUsageSesnorDataModMax 0x20 630 #define HidUsageSensorDataModMin 0x30 631 #define HidUsageSensorState 0x0A, 0x01, 0x02 632 #define HidUsageSensorStateUnknown 0x0A, 0x00, 0x08 633 #define HidUsageSensorStateReady 0x0A, 0x01, 0x08 634 #define HidUsageSensorStateNotAvailable 0x0A, 0x02, 0x08 635 #define HidUsageSensorStateNoData 0x0A, 0x03, 0x08 636 #define HidUsageSensorStateInitializing 0x0A, 0x04, 0x08 637 #define HidUsageSensorStateAccessDenied 0x0A, 0x05, 0x08 638 #define HidUsageSensorStateError 0x0A, 0x06, 0x08 639 #define HidUsageSensorEventUnknown 0x0A, 0x10, 0x08 640 #define HidUsageSensorEventStateChanged 0x0A, 0x11, 0x08 641 #define HidUsageSensorEventProperyChanged 0x0A, 0x12, 0x08 642 #define HidUsageSensorEventDataUpdated 0x0A, 0x13, 0x08 643 #define HidUsageSensorEventPollResponse 0x0A, 0x14, 0x08 644 #define HidUsageSensorEventChangeSensitivity 0x0A, 0x15, 0x08 645 #define HidUsageSensorEventMaxReached 0x0A, 0x16, 0x08 646 #define HidUsageSensorEventMinReached 0x0A, 0x17, 0x08 647 #define HidUsageSensorEventHighThresholdCrossUpward 0x0A, 0x18, 0x08 648 #define HidUsageSensorEventHighThresholdCrossDownward 0x0A, 0x19, 0x08 649 #define HidUsageSensorEventLowThresholdCrossUpward 0x0A, 0x1A, 0x08 650 #define HidUsageSensorEventLowThresholdCrossDownward 0x0A, 0x1B, 0x08 651 #define HidUsageSensorEventZeroThresholdCrossUpward 0x0A, 0x1C, 0x08 652 #define HidUsageSensorEventZeroThresholdCrossDownward 0x0A, 0x1D, 0x08 653 #define HidUsageSensorEventPeriodExceeded 0x0A, 0x1E, 0x08 654 #define HidUsageSensorEventFrequencyExceeded 0x0A, 0x1F, 0x08 655 #define HidUsageSensorEventComplexTrigger 0x0A, 0x20, 0x08 666 #define USBDHID_MAX_PACKET 64 1007 #define USBD_HID_EVENT_GET_REPORT \ 1008 (USBD_HID_EVENT_BASE + 0) 1022 #define USBD_HID_EVENT_REPORT_SENT \ 1023 (USBD_HID_EVENT_BASE + 1) 1038 #define USBD_HID_EVENT_GET_REPORT_BUFFER \ 1039 (USBD_HID_EVENT_BASE + 2) 1053 #define USBD_HID_EVENT_SET_REPORT \ 1054 (USBD_HID_EVENT_BASE + 3) 1063 #define USBD_HID_EVENT_GET_PROTOCOL \ 1064 (USBD_HID_EVENT_BASE + 4) 1073 #define USBD_HID_EVENT_SET_PROTOCOL \ 1074 (USBD_HID_EVENT_BASE + 5) 1086 #define USBD_HID_EVENT_IDLE_TIMEOUT \ 1087 (USBD_HID_EVENT_BASE + 6) 1102 uint32_t ui32Length,
bool bLast);
1104 uint32_t ui32Length,
bool bLast);
1139 #endif // __USBDHID_H__
uint8_t ui8NumInputReports
Definition: usbdhid.h:880
tHIDInstance sPrivateData
Definition: usbdhid.h:984
Definition: usbdhid.h:798
bool bUseOutEndpoint
Definition: usbdhid.h:930
uint16_t ui16MaxPowermA
The maximum power consumption of the device, expressed in milliamps.
Definition: usbdhid.h:854
tUSBCallback pfnTxCallback
Definition: usbdhid.h:913
void USBDHIDTerm(void *pvHIDInstance)
Definition: usbdhid.c:2007
const uint8_t *const * ppui8ClassDescriptors
Definition: usbdhid.h:946
Definition: usbdhid.h:705
uint8_t ui8INEndpoint
Definition: usbdhid.h:776
uint32_t ui32NumStringDescriptors
Definition: usbdhid.h:972
bool bGetRequestPending
Definition: usbdhid.h:771
Definition: usbdhid.h:691
tHIDReportIdle * psReportIdle
Definition: usbdhid.h:892
uint8_t ui8ReportID
Definition: usbdhid.h:814
uint16_t ui16VID
The vendor ID that this device is to present in the device descriptor.
Definition: usbdhid.h:844
uint8_t * pui8OutReportData
Definition: usbdhid.h:756
tDeviceInfo sDevInfo
Definition: usbdhid.h:715
uint16_t ui16OutReportSize
Definition: usbdhid.h:746
uint32_t ui32USBBase
Definition: usbdhid.h:710
Definition: usbdevice.h:135
tHIDState
Definition: usbdhid.h:676
Definition: usbdhid.h:839
void USBDHIDPowerStatusSet(void *pvHIDInstance, uint8_t ui8Power)
Definition: usbdhid.c:2450
const tHIDDescriptor * psHIDDescriptor
Definition: usbdhid.h:937
void * USBDHIDInit(uint32_t ui32Index, tUSBDHIDDevice *psHIDDevice)
Definition: usbdhid.c:1789
uint32_t ui32TimeSinceReportmS
Definition: usbdhid.h:829
const tConfigHeader *const * ppsConfigDescriptor
Definition: usbdhid.h:977
void * pvTxCBData
Definition: usbdhid.h:920
volatile uint16_t ui16DeferredOpFlags
Definition: usbdhid.h:731
uint16_t ui16InReportSize
Definition: usbdhid.h:736
bool USBDHIDRemoteWakeupRequest(void *pvHIDInstance)
Definition: usbdhid.c:2481
uint8_t ui8PwrAttributes
Definition: usbdhid.h:862
uint8_t ui8Subclass
The interface subclass to publish to the server for this HID device.
Definition: usbdhid.h:867
uint32_t USBDHIDTxPacketAvailable(void *pvHIDInstance)
Definition: usbdhid.c:2347
uint32_t USBDHIDReportWrite(void *pvHIDInstance, uint8_t *pi8Data, uint32_t ui32Length, bool bLast)
Definition: usbdhid.c:2141
void * pvRxCBData
Definition: usbdhid.h:906
volatile bool bSendInProgress
Definition: usbdhid.h:766
uint8_t ui8OUTEndpoint
Definition: usbdhid.h:781
uint8_t * pui8InReportData
Definition: usbdhid.h:751
tUSBCallback pfnRxCallback
Definition: usbdhid.h:899
volatile tHIDState iHIDRxState
Definition: usbdhid.h:720
uint16_t ui16InReportIndex
Definition: usbdhid.h:741
Definition: usbdevice.h:66
uint32_t(* tUSBCallback)(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgParam, void *pvMsgData)
Definition: usblib.h:1220
volatile bool bConnected
Definition: usbdhid.h:761
uint32_t USBDHIDPacketRead(void *pvHIDInstance, uint8_t *pi8Data, uint32_t ui32Length, bool bLast)
Definition: usbdhid.c:2246
uint16_t ui16PID
The product ID that this device is to present in the device descriptor.
Definition: usbdhid.h:849
Definition: usbdhid.h:681
uint32_t USBDHIDRxPacketAvailable(void *pvHIDInstance)
Definition: usbdhid.c:2395
uint8_t ui8Duration4mS
Definition: usbdhid.h:805
void * USBDHIDCompositeInit(uint32_t ui32Index, tUSBDHIDDevice *psHIDDevice, tCompositeEntry *psCompEntry)
Definition: usbdhid.c:1849
struct tHIDInstance tHIDInstance
Definition: usbhhid.h:44
uint16_t ui16TimeTillNextmS
Definition: usbdhid.h:821
void * USBDHIDSetRxCBData(void *pvHIDInstance, void *pvCBData)
Definition: usbdhid.c:2050
uint8_t ui8Protocol
The interface protocol to publish to the server for this HID device.
Definition: usbdhid.h:872
uint8_t ui8Interface
Definition: usbdhid.h:786
void * USBDHIDSetTxCBData(void *pvHIDInstance, void *pvCBData)
Definition: usbdhid.c:2092
const uint8_t *const * ppui8StringDescriptors
Definition: usbdhid.h:966
volatile tHIDState iHIDTxState
Definition: usbdhid.h:725
Definition: usbdhid.h:686