USB software Events Management
[USB task entry point module]

Collaboration diagram for USB software Events Management:

Macros to manage USB events detected under interrupt. More...

Defines

#define Usb_send_event(x)   (g_usb_event |= (1<<x))
#define Usb_ack_event(x)   (g_usb_event &= ~(1<<x))
#define Usb_clear_all_event()   (g_usb_event = 0)
#define Is_usb_event(x)   ((g_usb_event & (1<<x)) ? TRUE : FALSE)
#define Is_not_usb_event(x)   ((g_usb_event & (1<<x)) ? FALSE: TRUE)
#define Is_host_emergency_exit()   (Is_usb_event(EVT_HOST_DISCONNECTION) || Is_usb_event(EVT_USB_DEVICE_FUNCTION))
#define Is_usb_device()   (g_usb_mode==USB_MODE_DEVICE ? TRUE : FALSE)
#define Is_usb_host()   (g_usb_mode==USB_MODE_HOST ? TRUE : FALSE)
#define Otg_send_event(x)   (g_otg_event |= (1<<x))
#define Otg_ack_event(x)   (g_otg_event &= ~(1<<x))
#define Otg_clear_all_event()   (g_otg_event = 0)
#define Is_otg_event(x)   ((g_otg_event & (1<<x)) ? TRUE : FALSE)
#define Is_not_otg_event(x)   ((g_otg_event & (1<<x)) ? FALSE: TRUE)
#define EVT_USB_POWERED   1
#define EVT_USB_UNPOWERED   2
#define EVT_USB_DEVICE_FUNCTION   3
#define EVT_USB_HOST_FUNCTION   4
#define EVT_USB_SUSPEND   5
#define EVT_USB_WAKE_UP   6
#define EVT_USB_RESUME   7
#define EVT_USB_RESET   8
#define EVT_HOST_SOF   9
#define EVT_HOST_HWUP   10
#define EVT_HOST_DISCONNECTION   11
#define EVT_HOST_REMOTE_WAKEUP   12
#define EVT_OTG_HNP_ERROR   1
#define EVT_OTG_HNP_SUCCESS   2
#define EVT_OTG_SRP_RECEIVED   3
#define EVT_OTG_DEV_UNSUPPORTED   4
#define EVT_OTG_DEVICE_CONNECTED   5

Detailed Description

Macros to manage USB events detected under interrupt.


Define Documentation

#define Usb_send_event (  )     (g_usb_event |= (1<<x))

Definition at line 30 of file usb_task.h.

Referenced by usb_general_interrupt(), and usb_task_init().

#define Usb_ack_event (  )     (g_usb_event &= ~(1<<x))

Definition at line 31 of file usb_task.h.

Referenced by host_send_control(), usb_device_task(), and usb_host_task().

 
#define Usb_clear_all_event (  )     (g_usb_event = 0)

Definition at line 32 of file usb_task.h.

Referenced by usb_host_task().

#define Is_usb_event (  )     ((g_usb_event & (1<<x)) ? TRUE : FALSE)

Definition at line 33 of file usb_task.h.

Referenced by usb_device_task(), and usb_host_task().

#define Is_not_usb_event (  )     ((g_usb_event & (1<<x)) ? FALSE: TRUE)

Definition at line 34 of file usb_task.h.

Referenced by host_send_control().

 
#define Is_host_emergency_exit (  )     (Is_usb_event(EVT_HOST_DISCONNECTION) || Is_usb_event(EVT_USB_DEVICE_FUNCTION))

Definition at line 36 of file usb_task.h.

Referenced by host_get_data(), host_send_control(), host_send_data(), and usb_host_task().

 
#define Is_usb_device (  )     (g_usb_mode==USB_MODE_DEVICE ? TRUE : FALSE)

Definition at line 37 of file usb_task.h.

 
#define Is_usb_host (  )     (g_usb_mode==USB_MODE_HOST ? TRUE : FALSE)

Definition at line 38 of file usb_task.h.

#define Otg_send_event (  )     (g_otg_event |= (1<<x))

Definition at line 40 of file usb_task.h.

Referenced by otg_not_supported_device(), usb_general_interrupt(), and usb_process_request().

#define Otg_ack_event (  )     (g_otg_event &= ~(1<<x))

Definition at line 41 of file usb_task.h.

Referenced by usb_device_task().

 
#define Otg_clear_all_event (  )     (g_otg_event = 0)

Definition at line 42 of file usb_task.h.

#define Is_otg_event (  )     ((g_otg_event & (1<<x)) ? TRUE : FALSE)

Definition at line 43 of file usb_task.h.

Referenced by usb_device_task().

#define Is_not_otg_event (  )     ((g_otg_event & (1<<x)) ? FALSE: TRUE)

Definition at line 44 of file usb_task.h.

#define EVT_USB_POWERED   1

Definition at line 46 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_USB_UNPOWERED   2

Definition at line 47 of file usb_task.h.

Referenced by usb_device_task(), and usb_general_interrupt().

#define EVT_USB_DEVICE_FUNCTION   3

Definition at line 48 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_USB_HOST_FUNCTION   4

Definition at line 49 of file usb_task.h.

Referenced by usb_general_interrupt(), and usb_task_init().

#define EVT_USB_SUSPEND   5

Definition at line 50 of file usb_task.h.

Referenced by usb_device_task(), usb_general_interrupt(), and usb_host_task().

#define EVT_USB_WAKE_UP   6

Definition at line 51 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_USB_RESUME   7

Definition at line 52 of file usb_task.h.

Referenced by usb_device_task(), and usb_general_interrupt().

#define EVT_USB_RESET   8

Definition at line 53 of file usb_task.h.

Referenced by usb_device_task(), and usb_general_interrupt().

#define EVT_HOST_SOF   9

Definition at line 54 of file usb_task.h.

Referenced by host_send_control(), usb_general_interrupt(), and usb_host_task().

#define EVT_HOST_HWUP   10

Definition at line 55 of file usb_task.h.

Referenced by usb_general_interrupt(), and usb_host_task().

#define EVT_HOST_DISCONNECTION   11

Definition at line 56 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_HOST_REMOTE_WAKEUP   12

Definition at line 57 of file usb_task.h.

Referenced by usb_general_interrupt(), and usb_host_task().

#define EVT_OTG_HNP_ERROR   1

Definition at line 59 of file usb_task.h.

Referenced by usb_device_task(), and usb_general_interrupt().

#define EVT_OTG_HNP_SUCCESS   2

Definition at line 60 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_OTG_SRP_RECEIVED   3

Definition at line 61 of file usb_task.h.

#define EVT_OTG_DEV_UNSUPPORTED   4

Definition at line 62 of file usb_task.h.

Referenced by otg_not_supported_device(), and usb_device_task().

#define EVT_OTG_DEVICE_CONNECTED   5

Definition at line 63 of file usb_task.h.

Referenced by usb_device_task(), and usb_process_request().


Generated on Mon Feb 19 09:32:15 2007 for Atmel by  doxygen 1.5.1-p1