LUFA Library 110528
USB Interface Management

USB Controller definitions for general USB controller management. More...

Modules

 USB Interface Management (AVR8)
 

USB Controller definitions for the AVR8 microcontrollers.


 USB Interface Management (UC3)
 

USB Controller definitions for the AVR32 UC3 microcontrollers.


Functions

void USB_USBTask (void)

Variables

volatile bool USB_IsInitialized
USB_Request_Header_t USB_ControlRequest

Detailed Description

Functions, macros, variables, enums and types related to the setup and management of the USB interface.


Function Documentation

void USB_USBTask ( void  )

This is the main USB management task. The USB driver requires this task to be executed continuously when the USB system is active (device attached in host mode, or attached to a host in device mode) in order to manage USB communications. This task may be executed inside an RTOS, fast timer ISR or the main user application loop.

The USB task must be serviced within 30ms while in device mode, or within 1ms while in host mode. The task may be serviced at all times, or (for minimum CPU consumption):

If in device mode (only), the control endpoint can instead be managed via interrupts entirely by the library by defining the INTERRUPT_CONTROL_ENDPOINT token and passing it to the compiler via the -D switch.

See also:
USB Events for more information on the USB events.

Variable Documentation

Structure containing the last received Control request when in Device mode (for use in user-applications inside of the EVENT_USB_Device_ControlRequest() event, or for filling up with a control request to issue when in Host mode before calling USB_Host_SendControlRequest().

volatile bool USB_IsInitialized

Indicates if the USB interface is currently initialized but not necessarily connected to a host or device (i.e. if USB_Init() has been run). If this is false, all other library globals related to the USB driver are invalid.

Note:
This variable should be treated as read-only in the user application, and never manually changed in value.