Fix cross compilation (e.g. on Darwin). Following changes to make.tmpl,
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / usbdesc.h
blobaac5ab05a042f0c44df5aef6ec7da690e2f23f2a
1 /*
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>
25 typedef enum {
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;
35 struct grub_usb_desc
37 grub_uint8_t length;
38 grub_uint8_t type;
39 } GRUB_PACKED;
41 struct grub_usb_desc_device
43 grub_uint8_t length;
44 grub_uint8_t type;
45 grub_uint16_t usbrel;
46 grub_uint8_t class;
47 grub_uint8_t subclass;
48 grub_uint8_t protocol;
49 grub_uint8_t maxsize0;
50 grub_uint16_t vendorid;
51 grub_uint16_t prodid;
52 grub_uint16_t devrel;
53 grub_uint8_t strvendor;
54 grub_uint8_t strprod;
55 grub_uint8_t strserial;
56 grub_uint8_t configcnt;
57 } GRUB_PACKED;
59 struct grub_usb_desc_config
61 grub_uint8_t length;
62 grub_uint8_t type;
63 grub_uint16_t totallen;
64 grub_uint8_t numif;
65 grub_uint8_t config;
66 grub_uint8_t strconfig;
67 grub_uint8_t attrib;
68 grub_uint8_t maxpower;
69 } GRUB_PACKED;
71 #if 0
72 struct grub_usb_desc_if_association
74 grub_uint8_t length;
75 grub_uint8_t type;
76 grub_uint8_t firstif;
77 grub_uint8_t ifcnt;
78 grub_uint8_t class;
79 grub_uint8_t subclass;
80 grub_uint8_t protocol;
81 grub_uint8_t function;
82 } GRUB_PACKED;
83 #endif
85 struct grub_usb_desc_if
87 grub_uint8_t length;
88 grub_uint8_t type;
89 grub_uint8_t ifnum;
90 grub_uint8_t altsetting;
91 grub_uint8_t endpointcnt;
92 grub_uint8_t class;
93 grub_uint8_t subclass;
94 grub_uint8_t protocol;
95 grub_uint8_t strif;
96 } GRUB_PACKED;
98 struct grub_usb_desc_endp
100 grub_uint8_t length;
101 grub_uint8_t type;
102 grub_uint8_t endp_addr;
103 grub_uint8_t attrib;
104 grub_uint16_t maxpacket;
105 grub_uint8_t interval;
106 } GRUB_PACKED;
108 struct grub_usb_desc_str
110 grub_uint8_t length;
111 grub_uint8_t type;
112 grub_uint16_t str[0];
113 } GRUB_PACKED;
115 struct grub_usb_desc_debug
117 grub_uint8_t length;
118 grub_uint8_t type;
119 grub_uint8_t in_endp;
120 grub_uint8_t out_endp;
121 } GRUB_PACKED;
123 struct grub_usb_usb_hubdesc
125 grub_uint8_t length;
126 grub_uint8_t type;
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. */
132 } GRUB_PACKED;
134 #endif /* GRUB_USBDESC_H */