Get a string descriptor
Synopsis:
#include <sys/usbdi.h>
char *usbd_string( struct usbd_device *device,
uint8_t index,
int langid );
Arguments:
- device
- An opaque handle used to identify the USB device.
- index
- An index into the device's (optional) string table.
- langid
- The language ID. The usbd_languages_descriptor() function
provides the supported language IDs for the device. If you specify 0,
usbd_string() selects the first or only supported language.
Description:
The usbd_string() function lets you obtain a
string from the USB device's table of strings, which
typically contains the names of the
vendor, the product, etc. The string table is optional.
Note:
The strings are actually in Unicode/wide
characters, so usb_string()
converts them to UTF-8 (byte stream) for you and places the resulting string
in a static buffer that's reused every time the function is
called.
The returned string includes a terminating null character.
Returns:
A pointer to the string in an internal static buffer,
or NULL on error or if the string table doesn't exist.
Classification:
QNX Neutrino, QNX 4
Safety: |
|
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |