Defines | Functions | Variables

# usb_task.h File Reference

This file contains the function declarations. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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

## Detailed Description

This file contains the function declarations.

- Compiler: IAR EWAVR and GNU GCC for AVR
- Supported devices: ATmega32U4

Author:
  Atmel Corporation: http://www.atmel.com
  Support and FAQ: http://support.atmel.no/

Definition in file usb_task.h.