4241d2b13a
* disk/ata.c: Spelling fixes. * disk/raid.c: Likewise. * disk/usbms.c: Likewise. * disk/dmraid_nvidia.c: Likewise. * kern/ieee1275/openfw.c: Likewise. * kern/ieee1275/init.c: Likewise. * kern/ieee1275/cmain.c: Likewise. * boot/i386/pc/cdboot.S: Likewise. * video/readers/png.c: Likewise. * video/i386/pc/vbe.c: Likewise. * fs/udf.c: Likewise. * fs/hfs.c: Likewise. * fs/reiserfs.c: Likewise. * efiemu/runtime/efiemu.c: Likewise. * efiemu/main.c: Likewise. * efiemu/mm.c: Likewise. * include/grub/elf.h: Likewise. * include/grub/xnu.h: Likewise. * include/grub/usbdesc.h: Likewise. * include/grub/usb.h: Likewise. * include/grub/script_sh.h: Likewise. * include/grub/lib/LzmaEnc.h: Likewise. * include/grub/efiemu/efiemu.h: Likewise. * include/grub/command.h: Likewise. * normal/menu.c: Likewise. * normal/main.c: Likewise. * normal/datetime.c: Likewise. * bus/usb/uhci.c: Likewise. * mmap/i386/uppermem.c: Likewise. * mmap/mmap.c: Likewise. * commands/acpi.c: Likewise. * commands/test.c: Likewise. * partmap/apple.c: Likewise. * font/font.c: Likewise. * loader/sparc64/ieee1275/linux.c: Likewise. * loader/macho.c: Likewise. * loader/i386/bsd_trampoline.S: Likewise. * loader/i386/bsd.c: Likewise. * loader/xnu.c: Likewise. * term/i386/pc/vesafb.c: Likewise. * term/usb_keyboard.c: Likewise. * util/resolve.c: Likewise. * util/getroot.c: Likewise.
119 lines
2.8 KiB
C
119 lines
2.8 KiB
C
/*
|
|
* GRUB -- GRand Unified Bootloader
|
|
* Copyright (C) 2008 Free Software Foundation, Inc.
|
|
*
|
|
* GRUB is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* GRUB is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef GRUB_USBDESC_H
|
|
#define GRUB_USBDESC_H 1
|
|
|
|
#include <grub/types.h>
|
|
#include <grub/symbol.h>
|
|
|
|
typedef enum {
|
|
GRUB_USB_DESCRIPTOR_DEVICE = 1,
|
|
GRUB_USB_DESCRIPTOR_CONFIG,
|
|
GRUB_USB_DESCRIPTOR_STRING,
|
|
GRUB_USB_DESCRIPTOR_INTERFACE,
|
|
GRUB_USB_DESCRIPTOR_ENDPOINT,
|
|
GRUB_USB_DESCRIPTOR_HUB = 0x29
|
|
} grub_usb_descriptor_t;
|
|
|
|
struct grub_usb_desc_device
|
|
{
|
|
grub_uint8_t length;
|
|
grub_uint8_t type;
|
|
grub_uint16_t usbrel;
|
|
grub_uint8_t class;
|
|
grub_uint8_t subclass;
|
|
grub_uint8_t protocol;
|
|
grub_uint8_t maxsize0;
|
|
grub_uint16_t vendorid;
|
|
grub_uint16_t prodid;
|
|
grub_uint16_t devrel;
|
|
grub_uint8_t strvendor;
|
|
grub_uint8_t strprod;
|
|
grub_uint8_t strserial;
|
|
grub_uint8_t configcnt;
|
|
} __attribute__ ((packed));
|
|
|
|
struct grub_usb_desc_config
|
|
{
|
|
grub_uint8_t length;
|
|
grub_uint8_t type;
|
|
grub_uint16_t totallen;
|
|
grub_uint8_t numif;
|
|
grub_uint8_t config;
|
|
grub_uint8_t strconfig;
|
|
grub_uint8_t attrib;
|
|
grub_uint8_t maxpower;
|
|
} __attribute__ ((packed));
|
|
|
|
#if 0
|
|
struct grub_usb_desc_if_association
|
|
{
|
|
grub_uint8_t length;
|
|
grub_uint8_t type;
|
|
grub_uint8_t firstif;
|
|
grub_uint8_t ifcnt;
|
|
grub_uint8_t class;
|
|
grub_uint8_t subclass;
|
|
grub_uint8_t protocol;
|
|
grub_uint8_t function;
|
|
} __attribute__ ((packed));
|
|
#endif
|
|
|
|
struct grub_usb_desc_if
|
|
{
|
|
grub_uint8_t length;
|
|
grub_uint8_t type;
|
|
grub_uint8_t ifnum;
|
|
grub_uint8_t altsetting;
|
|
grub_uint8_t endpointcnt;
|
|
grub_uint8_t class;
|
|
grub_uint8_t subclass;
|
|
grub_uint8_t protocol;
|
|
grub_uint8_t strif;
|
|
} __attribute__ ((packed));
|
|
|
|
struct grub_usb_desc_endp
|
|
{
|
|
grub_uint8_t length;
|
|
grub_uint8_t type;
|
|
grub_uint8_t endp_addr;
|
|
grub_uint8_t attrib;
|
|
grub_uint16_t maxpacket;
|
|
grub_uint8_t interval;
|
|
} __attribute__ ((packed));
|
|
|
|
struct grub_usb_desc_str
|
|
{
|
|
grub_uint8_t length;
|
|
grub_uint8_t type;
|
|
grub_uint16_t str[0];
|
|
} __attribute__ ((packed));
|
|
|
|
struct grub_usb_usb_hubdesc
|
|
{
|
|
grub_uint8_t length;
|
|
grub_uint8_t type;
|
|
grub_uint8_t portcnt;
|
|
grub_uint16_t characteristics;
|
|
grub_uint8_t pwdgood;
|
|
grub_uint8_t current;
|
|
/* Removable and power control bits follow. */
|
|
} __attribute__ ((packed));
|
|
|
|
#endif /* GRUB_USBDESC_H */
|