/* usbtest.c - test module for USB */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008 Free Software Foundation, Inc.
*
* 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/>.
*/
GRUB_MOD_LICENSE ("GPLv3+");
static const char *usb_classes[] =
{
"Unknown",
"Audio",
"Communication Interface",
"HID",
"Unknown",
"Physical",
"Image",
"Printer",
"Mass Storage",
"Hub",
"Data Interface",
"Smart Card",
"Content Security",
"Video"
};
static const char *usb_endp_type[] =
{
"Control",
"Isochronous",
"Bulk",
"Interrupt"
};
static const char *usb_devspeed[] =
{
"",
"Low",
"Full",
"High"
};
static grub_usb_err_t
char **string)
{
/* Only get the length. */
if (err)
return err;
if (! descstrp)
return GRUB_USB_ERR_INTERNAL;
{
if (! *string)
return GRUB_USB_ERR_INTERNAL;
return GRUB_USB_ERR_NONE;
}
if (! *string)
{
return GRUB_USB_ERR_INTERNAL;
}
return GRUB_USB_ERR_NONE;
}
static void
{
char *name;
/* XXX: LANGID */
if (! idx)
return;
if (err)
else
{
}
}
static int
{
int i;
grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
grub_printf ("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n",
{
}
{
int j;
grub_printf ("Interface #%d: #Endpoints: %d ",
i, interf->endpointcnt);
grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
for (j = 0; j < interf->endpointcnt; j++)
{
grub_printf ("Endpoint #%d: %s, max packed size: %d, transfer type: %s, latency: %d\n",
}
}
grub_printf("\n");
return 0;
}
static grub_err_t
{
grub_printf ("USB devices:\n\n");
return 0;
}
{
0, N_("Test USB support."));
}
{
}