This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Get a string descriptor
#include <sys/usbdi.h> char *usbd_string( struct usbd_device *device, _uint8 index, int langid );
The usbd_string() function lets you obtain a string from the USB device's table of strings.
Typically, the string table may contain the names of the vendor, the product, etc. The string table is optional.
Note that the strings are actually in Unicode/wide characters, so usb_string() also conveniently converts them to UTF-8 (byte stream) for you.
Note that usbd_string() places the result string in a static buffer that's reused every time the function is called.
A pointer to the string in an internal static buffer, or NULL on error.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | No |
usbd_args_lookup(), usbd_configuration_descriptor(), usbd_device_lookup(), usbd_device_extra(), usbd_device_descriptor(), usbd_endpoint_descriptor(), usbd_hcd_info(), usbd_hub_descriptor(), usbd_interface_descriptor(), usbd_languages_descriptor(), usbd_parse_descriptors(), usbd_urb_status()