Modules | Defines | Functions | Variables

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)
 This function initializes the USB proces.
void usb_task (void)
 Entry point of the USB mamnagement.

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 proces.

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.

{
   #if (USE_USB_PADS_REGULATOR==ENABLE)  // Otherwise assume USB PADs regulator is not used
   Usb_enable_regulator();
   #endif
   usb_device_task_init();
}

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

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().

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.