2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2008 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_USBDESC_H
20 #define GRUB_USBDESC_H 1
22 #include <grub/types.h>
23 #include <grub/symbol.h>
26 GRUB_USB_DESCRIPTOR_DEVICE
= 1,
27 GRUB_USB_DESCRIPTOR_CONFIG
,
28 GRUB_USB_DESCRIPTOR_STRING
,
29 GRUB_USB_DESCRIPTOR_INTERFACE
,
30 GRUB_USB_DESCRIPTOR_ENDPOINT
,
31 GRUB_USB_DESCRIPTOR_DEBUG
= 10,
32 GRUB_USB_DESCRIPTOR_HUB
= 0x29
33 } grub_usb_descriptor_t
;
41 struct grub_usb_desc_device
47 grub_uint8_t subclass
;
48 grub_uint8_t protocol
;
49 grub_uint8_t maxsize0
;
50 grub_uint16_t vendorid
;
53 grub_uint8_t strvendor
;
55 grub_uint8_t strserial
;
56 grub_uint8_t configcnt
;
59 struct grub_usb_desc_config
63 grub_uint16_t totallen
;
66 grub_uint8_t strconfig
;
68 grub_uint8_t maxpower
;
72 struct grub_usb_desc_if_association
79 grub_uint8_t subclass
;
80 grub_uint8_t protocol
;
81 grub_uint8_t function
;
85 struct grub_usb_desc_if
90 grub_uint8_t altsetting
;
91 grub_uint8_t endpointcnt
;
93 grub_uint8_t subclass
;
94 grub_uint8_t protocol
;
98 struct grub_usb_desc_endp
102 grub_uint8_t endp_addr
;
104 grub_uint16_t maxpacket
;
105 grub_uint8_t interval
;
108 struct grub_usb_desc_str
112 grub_uint16_t str
[0];
115 struct grub_usb_desc_debug
119 grub_uint8_t in_endp
;
120 grub_uint8_t out_endp
;
123 struct grub_usb_usb_hubdesc
127 grub_uint8_t portcnt
;
128 grub_uint16_t characteristics
;
129 grub_uint8_t pwdgood
;
130 grub_uint8_t current
;
131 /* Removable and power control bits follow. */
134 #endif /* GRUB_USBDESC_H */