RE: Setting the ARM as a USB bulk device » usbstring.h
1 |
/*
|
---|---|
2 |
* (c) Copyright 2003 by David Brownell
|
3 |
* All Rights Reserved.
|
4 |
*
|
5 |
* This software is licensed under the GNU LGPL version 2.
|
6 |
*/
|
7 |
|
8 |
/* utility to simplify dealing with string descriptors */
|
9 |
|
10 |
/**
|
11 |
* struct usb_string - wraps a C string and its USB id
|
12 |
* @id: the (nonzero) ID for this string
|
13 |
* @s: the string, in UTF-8 encoding
|
14 |
*
|
15 |
* If you're using usb_gadget_get_string(), use this to wrap a string
|
16 |
* together with its ID.
|
17 |
*/
|
18 |
struct usb_string { |
19 |
__u8 id; |
20 |
const char *s; |
21 |
};
|
22 |
|
23 |
/**
|
24 |
* struct usb_gadget_strings - a set of USB strings in a given language
|
25 |
* @language: identifies the strings' language (0x0409 for en-us)
|
26 |
* @strings: array of strings with their ids
|
27 |
*
|
28 |
* If you're using usb_gadget_get_string(), use this to wrap all the
|
29 |
* strings for a given language.
|
30 |
*/
|
31 |
struct usb_gadget_strings { |
32 |
__u16 language; /* 0x0409 for en-us */ |
33 |
struct usb_string *strings; |
34 |
};
|
35 |
|
36 |
/* put descriptor for string with that id into buf (buflen >= 256) */
|
37 |
int usb_gadget_get_string (struct usb_gadget_strings *table, int id, __u8 *buf); |
38 |
|
- « Previous
- 1
- 2
- 3
- 4
- Next »