Data Structures | Macros | Enumerations | Functions
usbdhid.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tHIDInstance
 
struct  tHIDReportIdle
 
struct  tUSBDHIDDevice
 

Macros

#define HIDINTERFACE_SIZE   (9)
 
#define HIDINENDPOINT_SIZE   (7)
 
#define HIDOUTENDPOINT_SIZE   (7)
 
#define HIDDESCRIPTOR_SIZE   (9)
 
#define COMPOSITE_DHID_SIZE
 
#define UsagePage(ui8Value)   0x05, ((ui8Value) & 0xff)
 
#define UsagePageVendor(ui16Value)
 
#define Usage(ui8Value)   0x09, ((ui8Value) & 0xff)
 
#define UsageVendor(ui16Value)
 
#define UsageMinimum(ui8Value)   0x19, ((ui8Value) & 0xff)
 
#define UsageMaximum(ui8Value)   0x29, ((ui8Value) & 0xff)
 
#define LogicalMinimum(i8Value)   0x15, ((i8Value) & 0xff)
 
#define LogicalMaximum(i8Value)   0x25, ((i8Value) & 0xff)
 
#define LogicalMinimum16(i8Value, i8Value1)   0x16, i8Value, i8Value1
 
#define LogicalMaximum16(i8Value, i8Value1)   0x26, i8Value, i8Value1
 
#define LogicalMaximum32(i8Value, i8Value1, i8Value2, i8Value3)
 
#define PhysicalMinimum(i16Value)
 
#define PhysicalMaximum(i16Value)
 
#define Collection(ui8Value)   0xa1, ((ui8Value) & 0xff)
 
#define EndCollection   0xc0
 
#define ReportCount(ui8Value)   0x95, ((ui8Value) & 0xff)
 
#define ReportID(ui8Value)   0x85, ((ui8Value) & 0xff)
 
#define ReportSize(ui8Value)   0x75, ((ui8Value) & 0xff)
 
#define Input(ui8Value)   0x81, ((ui8Value) & 0xff)
 
#define Input2(ui16Value)
 
#define Feature(ui8Value)   0xB1, ((ui8Value) & 0xff)
 
#define Feature2(ui16Value)
 
#define Output(ui8Value)   0x91, ((ui8Value) & 0xff)
 
#define Output2(ui16Value)
 
#define UnitExponent(i8Value)   0x55, ((i8Value) & 0x0f)
 
#define Unit(ui32Value)
 
#define UnitDistance_cm   0x66, 0x11, 0x00
 
#define UnitDistance_i   0x66, 0x13, 0x00
 
#define UnitRotation_deg   0x66, 0x14, 0x00
 
#define UnitRotation_rad   0x66, 0x12, 0x00
 
#define UnitMass_g   0x66, 0x01, 0x01
 
#define UnitTime_s   0x66, 0x01, 0x10
 
#define UnitTemp_K   0x67, 0x01, 0x00, 0x01, 0x00
 
#define UnitTemp_F   0x67, 0x03, 0x00, 0x01, 0x00
 
#define UnitVelocitySI   0x66, 0x11, 0xF0
 
#define UnitMomentumSI   0x66, 0x11, 0xF1
 
#define UnitAccelerationSI   0x66, 0x11, 0xE0
 
#define UnitForceSI   0x66, 0x11, 0xE1
 
#define UnitEnergySI   0x66, 0x21, 0xE1
 
#define UnitAngAccelerationSI   0x66, 0x12, 0xE0
 
#define UnitVoltage   0x67, 0x21, 0xD1, 0xF0, 0x00
 
#define UnitCurrent_A   0x67, 0x01, 0x00, 0x10, 0x00
 
#define HidUsageSensorPropertyReportingState   0x0A, 0x16, 0x03
 
#define HidUsageSensorPropertySensorStatus   0x0A, 0x03, 0x03
 
#define HidUsageSensorPropertyReportInterval   0x0A, 0x0E, 0x03
 
#define HidUsageSensorData(a, b, c, d)   a, b, (c|d)
 
#define HidUsageSensorEvent   0x0A, 0x02, 0x02
 
#define HidUsageSensorDataEnvironmentalTemperature   0x0A, 0x34, 0x04
 
#define HidUsageSesnorDataModMax   0x20
 
#define HidUsageSensorDataModMin   0x30
 
#define HidUsageSensorState   0x0A, 0x01, 0x02
 
#define HidUsageSensorStateUnknown   0x0A, 0x00, 0x08
 
#define HidUsageSensorStateReady   0x0A, 0x01, 0x08
 
#define HidUsageSensorStateNotAvailable   0x0A, 0x02, 0x08
 
#define HidUsageSensorStateNoData   0x0A, 0x03, 0x08
 
#define HidUsageSensorStateInitializing   0x0A, 0x04, 0x08
 
#define HidUsageSensorStateAccessDenied   0x0A, 0x05, 0x08
 
#define HidUsageSensorStateError   0x0A, 0x06, 0x08
 
#define HidUsageSensorEventUnknown   0x0A, 0x10, 0x08
 
#define HidUsageSensorEventStateChanged   0x0A, 0x11, 0x08
 
#define HidUsageSensorEventProperyChanged   0x0A, 0x12, 0x08
 
#define HidUsageSensorEventDataUpdated   0x0A, 0x13, 0x08
 
#define HidUsageSensorEventPollResponse   0x0A, 0x14, 0x08
 
#define HidUsageSensorEventChangeSensitivity   0x0A, 0x15, 0x08
 
#define HidUsageSensorEventMaxReached   0x0A, 0x16, 0x08
 
#define HidUsageSensorEventMinReached   0x0A, 0x17, 0x08
 
#define HidUsageSensorEventHighThresholdCrossUpward   0x0A, 0x18, 0x08
 
#define HidUsageSensorEventHighThresholdCrossDownward   0x0A, 0x19, 0x08
 
#define HidUsageSensorEventLowThresholdCrossUpward   0x0A, 0x1A, 0x08
 
#define HidUsageSensorEventLowThresholdCrossDownward   0x0A, 0x1B, 0x08
 
#define HidUsageSensorEventZeroThresholdCrossUpward   0x0A, 0x1C, 0x08
 
#define HidUsageSensorEventZeroThresholdCrossDownward   0x0A, 0x1D, 0x08
 
#define HidUsageSensorEventPeriodExceeded   0x0A, 0x1E, 0x08
 
#define HidUsageSensorEventFrequencyExceeded   0x0A, 0x1F, 0x08
 
#define HidUsageSensorEventComplexTrigger   0x0A, 0x20, 0x08
 
#define USBDHID_MAX_PACKET   64
 
#define USBD_HID_EVENT_GET_REPORT   (USBD_HID_EVENT_BASE + 0)
 
#define USBD_HID_EVENT_REPORT_SENT   (USBD_HID_EVENT_BASE + 1)
 
#define USBD_HID_EVENT_GET_REPORT_BUFFER   (USBD_HID_EVENT_BASE + 2)
 
#define USBD_HID_EVENT_SET_REPORT   (USBD_HID_EVENT_BASE + 3)
 
#define USBD_HID_EVENT_GET_PROTOCOL   (USBD_HID_EVENT_BASE + 4)
 
#define USBD_HID_EVENT_SET_PROTOCOL   (USBD_HID_EVENT_BASE + 5)
 
#define USBD_HID_EVENT_IDLE_TIMEOUT   (USBD_HID_EVENT_BASE + 6)
 

Enumerations

enum  tHIDState { eHIDStateUnconfigured, eHIDStateIdle, eHIDStateWaitData }
 

Functions

void * USBDHIDInit (uint32_t ui32Index, tUSBDHIDDevice *psHIDDevice)
 
void * USBDHIDCompositeInit (uint32_t ui32Index, tUSBDHIDDevice *psHIDDevice, tCompositeEntry *psCompEntry)
 
void USBDHIDTerm (void *pvHIDInstance)
 
void * USBDHIDSetRxCBData (void *pvHIDInstance, void *pvCBData)
 
void * USBDHIDSetTxCBData (void *pvHIDInstance, void *pvCBData)
 
uint32_t USBDHIDReportWrite (void *pvHIDInstance, uint8_t *pi8Data, uint32_t ui32Length, bool bLast)
 
uint32_t USBDHIDPacketRead (void *pvHIDInstance, uint8_t *pi8Data, uint32_t ui32Length, bool bLast)
 
uint32_t USBDHIDTxPacketAvailable (void *pvHIDInstance)
 
uint32_t USBDHIDRxPacketAvailable (void *pvHIDInstance)
 
bool USBDHIDRemoteWakeupRequest (void *pvHIDInstance)
 
void USBDHIDPowerStatusSet (void *pvHIDInstance, uint8_t ui8Power)
 
Copyright 2018, Texas Instruments Incorporated