USB_GET_STRING

Section: (9)
Updated: 13 April 2004
Index Return to Main Contents

 

NAME

usb_get_string - gets a string descriptor  

SYNOPSIS

int usb_get_string (struct usb_device * dev, unsigned short langid, unsigned char index, void * buf, int size);  

ARGUMENTS

dev
the device whose string descriptor is being retrieved
langid
code for language chosen (from string descriptor zero)
index
the number of the descriptor
buf
where to put the string
size
how big is ``buf''?
 

CONTEXT

!in_interrupt ()  

DESCRIPTION

Retrieves a string, encoded using UTF-16LE (Unicode, 16 bits per character, in little-endian byte order). The usb_string function will often be a convenient way to turn these strings into kernel-printable form.

Strings may be referenced in device, configuration, interface, or other descriptors, and could also be used in vendor-specific ways.

This call is synchronous, and may not be used in an interrupt context.

Returns the number of bytes received on success, or else the status code returned by the underlying usb_control_msg call.  

ABOUT THIS DOCUMENT

This documentation was generated with kernel version 2.6.1.


 

Index

NAME
SYNOPSIS
ARGUMENTS
CONTEXT
DESCRIPTION
ABOUT THIS DOCUMENT

This document was created by man2html, using the manual pages.
Time: 11:22:04 GMT, April 13, 2004