- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# 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 | 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

## Detailed Description

Macros to manage USB events detected under interrupt.

## Define Documentation

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

Definition at line 30 of file usb_task.h.

Referenced by usb_general_interrupt().

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

Definition at line 31 of file usb_task.h.

Referenced by usb_device_task().

#define Usb_clear_all_event | ( |  | ) | (g_usb_event = 0)

Definition at line 32 of file usb_task.h.

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

Definition at line 33 of file usb_task.h.

Referenced by usb_device_task().

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

Definition at line 34 of file usb_task.h.

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

Definition at line 35 of file usb_task.h.

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

Definition at line 36 of file usb_task.h.

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

Definition at line 37 of file usb_task.h.

#define EVT_USB_POWERED 1

Definition at line 39 of file usb_task.h.

#define EVT_USB_UNPOWERED 2

Definition at line 40 of file usb_task.h.

#define EVT_USB_DEVICE_FUNCTION 3

Definition at line 41 of file usb_task.h.

#define EVT_USB_HOST_FUNCTION 4

Definition at line 42 of file usb_task.h.

#define EVT_USB_SUSPEND 5

Definition at line 43 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_USB_WAKE_UP 6

Definition at line 44 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_USB_RESUME 7

Definition at line 45 of file usb_task.h.

Referenced by usb_general_interrupt().

#define EVT_USB_RESET 8

Definition at line 46 of file usb_task.h.

Referenced by usb_device_task(), and usb_general_interrupt().

#define EVT_HOST_SOF 9

Definition at line 47 of file usb_task.h.

#define EVT_HOST_HWUP 10

Definition at line 48 of file usb_task.h.

#define EVT_HOST_DISCONNECTION 11

Definition at line 49 of file usb_task.h.