Home |
Function RTUGetInterface Function RTUEndpointPacketSize |
Function RTUGetInterfaceRTUGetInterface returns a pointer to an interface descriptor: typedef struct { BYTE bLength; // length in bytes of this descriptor BYTE bDescriptor; // descriptor ID (4) BYTE bInterfaceNumber; // number denoting this interface BYTE bAlternateSetting; // if != 0, an alternate setting BYTE bNumEndpoints; // number of endpoints in this interface BYTE bInterfaceClass; // USB class BYTE bInterfaceSubClass; // subclass (class specific) BYTE bInterfaceProtocol; // protocol (class specific) BYTE iInterface; // index of string descr. of this interface } RTUInterfaceDescriptor; const RTUInterfaceDescriptor * RTUGetInterface(const RTUConfigurationDescriptor * Config, int Index); ParametersConfigPointer to a configuration descriptor of the configuration containing the desired interface. IndexZero-based index of the interface descriptor to retrieve. This parameter must be in the range 0 .. RTUAltInterfaces(Config)-1. return valuePointer to the desired interface descriptor or NULL if parameter Index is out of range. To determine the number of all interface descriptors, use function RTUAltInterfaces. Member iInterface is a string descriptor index and can be used with RTUGetString to retrieve displayable information about the interface. If a USB client wishes to use the interface, it must call RTUClaimInterface. Several interfaces of the same configuration can be claimed by a single or several clients, but no two clients can claim the same interface. Further details about the interface descriptor are given in the USB specification.
|