/* Returns the current speed of the USB device connected. */
unsigned long USBHostSpeedGet(unsigned long ulBase)
/* Returns the current speed of the USB device connected. */
unsigned long USBHostSpeedGet(unsigned long ulBase)
{
    ASSERT(ulBase == USB0_BASE);
    if(HWREGB(ulBase + USB_O_DEVCTL) & USB_DEVCTL_FSDEV)
    {
        return(USB_FULL_SPEED);
    }
    if(HWREGB(ulBase + USB_O_DEVCTL) & USB_DEVCTL_LSDEV)
    {
        return(USB_LOW_SPEED);
    }
    return(USB_UNDEF_SPEED);
}