Home |
Function RTUGetConfiguration Function RTUEndpointPacketSize |
Function RTUGetConfigurationRTUGetConfiguration returns a pointer to a configuration descriptor of a device: typedef struct { BYTE bLength; // length in bytes of this descriptor BYTE bDescriptor; // descriptor ID (2) WORD wTotalLength; // length of all descriptors in this config. BYTE bNumInterfaces; // nr. of interfaces in this configuration BYTE bConfigurationValue; // value to use for SetConfiguration BYTE iConfiguration; // index of string descr. of this config. BYTE bmAttributes; // flags BYTE bMaxPower; // power requirements in 2 mA units } RTUConfigurationDescriptor; const RTUConfigurationDescriptor * RTUGetConfiguration(RTUDeviceHandle Device, int Configuration); ParametersDeviceDevice handle passed to an attachment and detachment callback. ConfigurationZero-based index of the configuration to retrieve. This parameter must be in the range 0 .. RTUDeviceDescriptor.bNumConfigurations-1. return valuePointer to the desired configuration descriptor or NULL if parameter Configuration is out of range. Member bNumInterfaces contains the number of interfaces available in this configuration, not counting any alternate settings. To determine the number of interfaces descriptors, use function RTUAltInterfaces. Member iConfiguration is a string descriptor index and can be used with RTUGetString to retrieve displayable information about the configuration. Further details about the configuration descriptor are given in the USB specification.
|