
usbd
_
string() © 2007, QNX Software Systems GmbH & Co. KG.
Get a string descriptor
Synopsis:
#include <sys/usbdi.h>
char *usbd_string( struct usbd_device *device,
_uint8 index,
int langid );
Arguments:
device An opaque handle used to identify the USB device.
index Index into the device’s (optional) string table.
langid Language ID. The usbd
_
languages
_
descriptor() function provides the
supported langids for the device. If you specify 0, the usbd
_
string()
function will select the first/only supported language.
Library:
libusbdi
Description:
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.
Returns:
A pointer to the string in an internal static buffer, or NULL on error.
Classification:
QNX Neutrino, QNX 4
Safety
Cancellation point No
Interrupt handler No
continued. . .
82 Chapter 4 • USB Library Reference September 10, 2007
Kommentare zu diesen Handbüchern