USBLibAPIGuide  1.00.00.01
Data Fields
tUSBDHIDGamepadDevice Struct Reference

#include <usbdhidgamepad.h>

Collaboration diagram for tUSBDHIDGamepadDevice:
Collaboration graph
[legend]

Data Fields

const uint16_t ui16VID
 The vendor ID that this device is to present in the device descriptor. More...
 
const uint16_t ui16PID
 The product ID that this device is to present in the device descriptor. More...
 
const uint16_t ui16MaxPowermA
 The maximum power consumption of the device, expressed in milliamps. More...
 
const uint8_t ui8PwrAttributes
 
const tUSBCallback pfnCallback
 
void * pvCBData
 
const uint8_t *const * ppui8StringDescriptors
 
const uint32_t ui32NumStringDescriptors
 
const uint8_t * pui8ReportDescriptor
 
const uint32_t ui32ReportSize
 
tUSBDGamepadInstance sPrivateData
 

Detailed Description

This structure is used by the application to define operating parameters for the HID game device.

Field Documentation

§ ui16VID

const uint16_t tUSBDHIDGamepadDevice::ui16VID

The vendor ID that this device is to present in the device descriptor.

Referenced by USBDHIDGamepadCompositeInit().

§ ui16PID

const uint16_t tUSBDHIDGamepadDevice::ui16PID

The product ID that this device is to present in the device descriptor.

Referenced by USBDHIDGamepadCompositeInit().

§ ui16MaxPowermA

const uint16_t tUSBDHIDGamepadDevice::ui16MaxPowermA

The maximum power consumption of the device, expressed in milliamps.

Referenced by USBDHIDGamepadCompositeInit().

§ ui8PwrAttributes

const uint8_t tUSBDHIDGamepadDevice::ui8PwrAttributes

Indicates whether the device is self- or bus-powered and whether or not it supports remote wake up. Valid values are USB_CONF_ATTR_SELF_PWR or USB_CONF_ATTR_BUS_PWR, optionally ORed with USB_CONF_ATTR_RWAKE.

Referenced by USBDHIDGamepadCompositeInit().

§ pfnCallback

const tUSBCallback tUSBDHIDGamepadDevice::pfnCallback

A pointer to the callback function that is called to notify the application of general events. This pointer must point to a valid function.

Referenced by USBDHIDGamepadCompositeInit(), and USBDHIDGamepadInit().

§ pvCBData

void* tUSBDHIDGamepadDevice::pvCBData

A client-supplied pointer that is sent as the first parameter in all calls made to the pfnCallback gamedevice callback function.

§ ppui8StringDescriptors

const uint8_t* const* tUSBDHIDGamepadDevice::ppui8StringDescriptors

A pointer to the string descriptor array for this device. This array must contain the following string descriptor pointers in this order: Language descriptor, Manufacturer name string (language 1), Product name string (language 1), Serial number string (language 1),HID Interface description string (language 1), Configuration description string (language 1).

If supporting more than 1 language, the descriptor block (except for string descriptor 0) must be repeated for each language defined in the language descriptor.

Referenced by USBDHIDGamepadCompositeInit(), and USBDHIDGamepadInit().

§ ui32NumStringDescriptors

const uint32_t tUSBDHIDGamepadDevice::ui32NumStringDescriptors

The number of descriptors provided in the ppStringDescriptors array, which must be (1 + (5 * (number of languages))).

§ pui8ReportDescriptor

const uint8_t* tUSBDHIDGamepadDevice::pui8ReportDescriptor

Optional report descriptor if the application wants to use a custom descriptor.

§ ui32ReportSize

const uint32_t tUSBDHIDGamepadDevice::ui32ReportSize

The size of the optional report descriptor define in pui8ReportDescriptor.

§ sPrivateData

tUSBDGamepadInstance tUSBDHIDGamepadDevice::sPrivateData

The private instance data for this device. This memory must remain accessible for as long as the game device is in use and must not be modified by any code outside the HID game device driver.

Referenced by USBDHIDGamepadCompositeInit(), USBDHIDGamepadInit(), USBDHIDGamepadSendReport(), and USBDHIDGamepadTerm().


The documentation for this struct was generated from the following file:
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale