Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
USB device task module

Functions

void usb_device_task (void)
 Entry point of the USB device management. More...
 
void usb_device_task_init (void)
 This function initializes the USB device controller. More...
 
void usb_start_device (void)
 This function starts the USB device controller. More...
 

void usb_device_task ( void  )

Entry point of the USB device management.

This function is the entry point of the USB management. Each USB event is checked here in order to launch the appropriate action. If a Setup request occurs on the Default Control Endpoint, the usb_process_request() function is call in the usb_standard_request.c file

References EP_CONTROL, EVT_USB_POWERED, EVT_USB_RESET, Is_usb_event, Is_usb_setup_received, Is_usb_vbus_high, Usb_ack_event, usb_configuration_nb, usb_connected, usb_process_request(), Usb_reset_endpoint, Usb_send_event, usb_start_device(), and Usb_vbus_on_action.

Referenced by usb_device_task_init(), and usb_task().

void usb_device_task_init ( void  )

This function initializes the USB device controller.

This function enables the USB controller and inits the USB interrupts. The aim is to allow the USB connection detection in order to send the appropriate USB event to the operating mode manager.

Todo:
Implement this on the silicon version

References AVR32_USBB_udcon, Disable_global_interrupt, Enable_global_interrupt, Is_usb_clock_frozen, Is_usb_enabled, Set_bits, Usb_ack_suspend, usb_configuration_nb, usb_connected, usb_device_task(), Usb_disable, Usb_disable_otg_pad, Usb_enable, Usb_enable_otg_pad, Usb_enable_vbus_interrupt, and Usb_unfreeze_clock.

Referenced by usb_task().

void usb_start_device ( void  )

This function starts the USB device controller.

This function enables the USB controller and inits the USB interrupts. The aim is to allow the USB connection detection in order to send the appropriate USB event to the operating mode manager. Start device function is executed once VBus connection has been detected either by the VBus change interrupt or by the VBus high level.

References Usb_attach, usb_connected, Usb_enable_reset_interrupt, Usb_enable_suspend_interrupt, Usb_force_full_speed_mode, usb_init_device(), and Usb_use_dual_speed_mode.

Referenced by usb_device_task(), and usb_general_interrupt().