USB task entry point


Modules

 USB software Events Management
 Macros to manage USB events detected under interrupt.

Defines

#define USB_MODE_UNDEFINED   0x00
#define USB_MODE_HOST   0x01
#define USB_MODE_DEVICE   0x02

Functions

void usb_task_init (void)
void usb_task (void)

Variables

volatile U16 g_usb_event
 Public : U16 g_usb_event usb_connected is used to store USB events detected upon USB general interrupt subroutine Its value is managed by the following macros (See usb_task.h file) Usb_send_event(x) Usb_ack_event(x) Usb_clear_all_event() Is_usb_event(x) Is_not_usb_event(x).
U8 g_usb_mode
volatile U8 private_sof_counter

Define Documentation

#define USB_MODE_UNDEFINED   0x00

Definition at line 74 of file usb_task.h.

#define USB_MODE_HOST   0x01

Definition at line 75 of file usb_task.h.

#define USB_MODE_DEVICE   0x02

Definition at line 76 of file usb_task.h.


Function Documentation

void usb_task_init ( void   ) 

This function initializes the USB proces.

This function enables the USB controller and init 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. Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function calls the corespong usb mode initialization function

Parameters:
none 
Returns:
none
This function initializes the USB process.

The function calls the coresponding usb mode initialization function

Parameters:
none 
Returns:
none

Definition at line 126 of file usb_task.c.

References usb_device_task_init(), and Usb_enable_regulator.

00127 {
00128    #if (USE_USB_PADS_REGULATOR==ENABLE)  // Otherwise assume USB PADs regulator is not used
00129    Usb_enable_regulator();
00130    #endif
00131    usb_device_task_init();
00132 }

Here is the call graph for this function:

void usb_task ( void   ) 

Entry point of the USB mamnagement Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function calls the corespong usb management function

Parameters:
none 
Returns:
none
Entry point of the USB mamnagement The function calls the coresponding usb management function.

Parameters:
none 
Returns:
none

Definition at line 143 of file usb_task.c.

References usb_device_task().

00144 {
00145    usb_device_task();
00146 }

Here is the call graph for this function:


Variable Documentation

volatile U16 g_usb_event

Public : U16 g_usb_event usb_connected is used to store USB events detected upon USB general interrupt subroutine Its value is managed by the following macros (See usb_task.h file) Usb_send_event(x) Usb_ack_event(x) Usb_clear_all_event() Is_usb_event(x) Is_not_usb_event(x).

Definition at line 83 of file usb_task.c.

U8 g_usb_mode

volatile U8 private_sof_counter


Generated on Fri Sep 11 15:02:36 2009 for ATMEL by  doxygen 1.5.3