1USB_GSTRINGS_ATTACH(9)      Kernel Mode Gadget API      USB_GSTRINGS_ATTACH(9)
2
3
4

NAME

6       usb_gstrings_attach - attach gadget strings to a cdev and assign ids
7

SYNOPSIS

9       struct usb_string *
10                                               usb_gstrings_attach(struct usb_composite_dev * cdev,
11                                               struct usb_gadget_strings ** sp,
12                                               unsigned n_strings);
13

ARGUMENTS

15       cdev
16           the device whose string descriptor IDs are being allocated and
17           attached.
18
19       sp
20           an array of usb_gadget_strings to attach.
21
22       n_strings
23           number of entries in each usb_strings array (sp[]->strings)
24

DESCRIPTION

26       This function will create a deep copy of usb_gadget_strings and
27       usb_string and attach it to the cdev. The actual string (usb_string.s)
28       will not be copied but only a referenced will be made. The struct
29       usb_gadget_strings array may contain multiple languges and should be
30       NULL terminated. The ->language pointer of each struct
31       usb_gadget_strings has to contain the same amount of entries.
32

FOR INSTANCE

34       sp[0] is en-US, sp[1] is es-ES. It is expected that the first
35       usb_string entry of es-ES containts the translation of the first
36       usb_string entry of en-US. Therefore both entries become the same id
37       assign.
38

AUTHOR

40       David Brownell <dbrownell@users.sourceforge.net>
41           Author.
42
44Kernel Hackers Manual 3.10         June 2019            USB_GSTRINGS_ATTACH(9)
Impressum