/* Returns the current speed of the USB controller in device mode. */
uint32_t USBDevSpeedGet(uint32_t ui32Base)
/* Returns the current speed of the USB controller in device mode. */
uint32_t USBDevSpeedGet(uint32_t ui32Base)
{
    ASSERT(ui32Base == USB0_BASE);
    if (HWREGB(ui32Base + USB_O_POWER) & USB_POWER_HSMODE)
    {
        return (USB_HIGH_SPEED);
    }
    return (USB_FULL_SPEED);
}