Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
USB software Events Management

Macros to manage USB events detected under interrupt.

Macros

#define EVT_HOST_CONNECTION   12
 
#define EVT_HOST_DISCONNECTION   11
 
#define EVT_HOST_HWUP   10
 
#define EVT_HOST_SOF   9
 
#define EVT_USB_DEVICE_FUNCTION   3
 
#define EVT_USB_HOST_FUNCTION   4
 
#define EVT_USB_POWERED   1
 
#define EVT_USB_RESET   8
 
#define EVT_USB_RESUME   7
 
#define EVT_USB_SUSPEND   5
 
#define EVT_USB_UNPOWERED   2
 
#define EVT_USB_WAKE_UP   6
 
#define Is_host_emergency_exit()   (Is_usb_device() || Is_usb_event(EVT_HOST_DISCONNECTION) || Is_usb_event(EVT_USB_DEVICE_FUNCTION))
 
#define Is_usb_device()   (g_usb_mode == USB_MODE_DEVICE)
 
#define Is_usb_event(x)   (Tst_bits(g_usb_event, 1 << (x)))
 
#define Is_usb_host()   (g_usb_mode == USB_MODE_HOST)
 
#define Usb_ack_event(x)   (Clr_bits(g_usb_event, 1 << (x)))
 
#define Usb_clear_all_event()   (g_usb_event = 0x0000)
 
#define Usb_send_event(x)   (Set_bits(g_usb_event, 1 << (x)))
 

#define EVT_HOST_CONNECTION   12

Referenced by usb_host_task().

#define EVT_HOST_DISCONNECTION   11

Referenced by usb_general_interrupt().

#define EVT_HOST_HWUP   10
#define EVT_HOST_SOF   9
#define EVT_USB_DEVICE_FUNCTION   3

Referenced by if(), and usb_general_interrupt().

#define EVT_USB_HOST_FUNCTION   4

Referenced by if(), and usb_general_interrupt().

#define EVT_USB_POWERED   1
#define EVT_USB_RESET   8
#define EVT_USB_RESUME   7

Referenced by usb_general_interrupt().

#define EVT_USB_SUSPEND   5

Referenced by usb_general_interrupt().

#define EVT_USB_UNPOWERED   2

Referenced by usb_general_interrupt().

#define EVT_USB_WAKE_UP   6

Referenced by usb_general_interrupt().

#define Is_usb_event (   x)    (Tst_bits(g_usb_event, 1 << (x)))
#define Is_usb_host ( )    (g_usb_mode == USB_MODE_HOST)
#define Usb_ack_event (   x)    (Clr_bits(g_usb_event, 1 << (x)))
#define Usb_clear_all_event ( )    (g_usb_event = 0x0000)

Referenced by usb_host_task().

#define Usb_send_event (   x)    (Set_bits(g_usb_event, 1 << (x)))