
AN758
Rev. 0.1 19
5.4. USB Low-Level Functions
The USB hardware access layer functions are in the AN758_USB_CDC\src\LUFA\Drivers\USB\Core\SIM3U
directory.
5.4.1. USB_Device_GetFrameNumber
Returns the current USB frame number.
Syntax
static inline uint16_t USB_Device_GetFrameNumber(void)
Parameters
None
Return Value
Current USB frame number from the USB controller
Description
This function returns the current USB frame number, when in device mode. Every millisecond the USB bus is
active.
Example
uint16_t PreviousFrameNumber = USB_Device_GetFrameNumber();
5.4.2. USB_Device_SetLowSpeed
Set USB device as low speed.
Syntax
static inline void USB_Device_SetLowSpeed(void)
Parameters
None
Return Value
None
Description
This function set USB device as low speed.
Example
if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
{
USB_Device_SetLowSpeed();
}
else
{
USB_Device_SetFullSpeed();
}
Comentarios a estos manuales