Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

usb_gstrings_attach(9) [centos man page]

USB_GSTRINGS_ATTACH(9)					      Kernel Mode Gadget API					    USB_GSTRINGS_ATTACH(9)

NAME
usb_gstrings_attach - attach gadget strings to a cdev and assign ids SYNOPSIS
struct usb_string * usb_gstrings_attach(struct usb_composite_dev * cdev, struct usb_gadget_strings ** sp, unsigned n_strings); ARGUMENTS
cdev the device whose string descriptor IDs are being allocated and attached. sp an array of usb_gadget_strings to attach. n_strings number of entries in each usb_strings array (sp[]->strings) DESCRIPTION
This function will create a deep copy of usb_gadget_strings and usb_string and attach it to the cdev. The actual string (usb_string.s) will not be copied but only a referenced will be made. The struct usb_gadget_strings array may contain multiple languges and should be NULL terminated. The ->language pointer of each struct usb_gadget_strings has to contain the same amount of entries. FOR INSTANCE
sp[0] is en-US, sp[1] is es-ES. It is expected that the first usb_string entry of es-ES containts the translation of the first usb_string entry of en-US. Therefore both entries become the same id assign. AUTHOR
David Brownell <dbrownell@users.sourceforge.net> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 USB_GSTRINGS_ATTACH(9)

Check Out this Related Man Page

STRUCT 
USB_COMPOSITE(9) Kernel Mode Gadget API STRUCT USB_COMPOSITE(9) NAME
struct_usb_composite_driver - groups configurations into a gadget SYNOPSIS
struct usb_composite_driver { const char * name; const struct usb_device_descriptor * dev; struct usb_gadget_strings ** strings; int (* bind) (struct usb_composite_dev *); int (* unbind) (struct usb_composite_dev *); void (* suspend) (struct usb_composite_dev *); void (* resume) (struct usb_composite_dev *); }; MEMBERS
name For diagnostics, identifies the driver. dev Template descriptor for the device, including default device identifiers. strings tables of strings, keyed by identifiers assigned during bind and language IDs provided in control requests bind (REQUIRED) Used to allocate resources that are shared across the whole device, such as string IDs, and add its configurations using usb_add_config(). This may fail by returning a negative errno value; it should return zero on successful initialization. unbind Reverses bind(); called as a side effect of unregistering this driver. suspend Notifies when the host stops sending USB traffic, after function notifications resume Notifies configuration when the host restarts USB traffic, before function notifications DESCRIPTION
Devices default to reporting self powered operation. Devices which rely on bus powered operation should report this in their bind() method. Before returning from bind, various fields in the template descriptor may be overridden. These include the idVendor/idProduct/bcdDevice values normally to bind the appropriate host side driver, and the three strings (iManufacturer, iProduct, iSerialNumber) normally used to provide user meaningful device identifiers. (The strings will not be defined unless they are defined in dev and strings.) The correct ep0 maxpacket size is also reported, as defined by the underlying controller driver. AUTHOR
David Brownell <dbrownell@users.sourceforge.net> Author. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 STRUCT USB_COMPOSITE(9)
Man Page

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can I assign the contents of file into an array?

I am trying to assign the contents of file e.g ls "$HOME" into an array. If it is possible then please guide me without using the concept of awk,sed, and perl16 Thanks (10 Replies)
Discussion started by: murtaza
10 Replies

2. UNIX for Dummies Questions & Answers

to assign cut values to an array

i need to seperate values seperated by delimiters and assign it to an array.. can u plz help me on that. Variables = "asd,rgbh,(,rty,got,),sroe,9034," i need to assign the variables into arrays.. like.. var=asd var=rgbh.. and so on how do i do this. i need to reuse the values stored in... (6 Replies)
Discussion started by: Syms
6 Replies

3. Shell Programming and Scripting

How to assign a variable to an array

I want to ask the user to enter an X amount of file names. I want to put those names into an array and then loop back through them to verify they are in the directory. 1st- How would I assign the value to an array and what is the correct syntax. 2nd- how would i reference that array after I... (3 Replies)
Discussion started by: tvb2727
3 Replies

4. Shell Programming and Scripting

how to assign file names to array variable?

I wish to assign file names with particular extention to array variables. For example if there are 5 files with .dat extention in /home/sam then i have to assign these 5 files to an array. plz help me how to accomplish this. Thanks in advance. (4 Replies)
Discussion started by: siteregsam
4 Replies

5. Programming

Unable to assign zero to unsigned character array

Hi, I am unable to assign value zero to my variable which is defined as unsigned char. typedef struct ABCD { unsigned char abc; unsigned char def; unsigned char ghi; } ABCD; typedef ABCD *PABCD; In my Por*C code, i assign the values using memcpy like below ... (3 Replies)
Discussion started by: gthangav
3 Replies