include/usb/usb_protocol.h File Reference

USB protocol definitions. More...

#include <types.h>

Include dependency graph for usb_protocol.h:

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

Go to the source code of this file.

Data Structures

struct  usb_setup_req
struct  usb_device_descriptor
struct  usb_device_qualifier_descriptor
struct  usb_configuration_descriptor
struct  usb_interface_descriptor
struct  usb_endpoint_descriptor

Defines

#define USB_CONFIG_ATTR_MUST_SET   (1U << 7)
 Must always be set.
#define USB_CONFIG_ATTR_SELF_POWERED   (1U << 6)
 Self-powered.
#define USB_CONFIG_ATTR_REMOTE_WAKEUP   (1U << 5)
 Supports remote wakeup.
#define USB_CONFIG_MAX_POWER(ma)   (((ma) + 1) / 2)
 Max power in mA.

Enumerations

enum  usb_device_state
enum  usb_device_speed
enum  usb_reqtype
enum  usb_recipient
enum  usb_reqid
enum  usb_device_feature
enum  usb_endpoint_feature
enum  usb_test_mode_selector
enum  usb_descriptor_type

Variables

struct usb_setup_req __packed


Detailed Description

USB protocol definitions.

This file contains definitions and data structures taken from the USB 2.0 specification.

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

Definition in file usb_protocol.h.


Define Documentation

#define USB_CONFIG_ATTR_MUST_SET   (1U << 7)

Must always be set.

Definition at line 238 of file usb_protocol.h.

#define USB_CONFIG_ATTR_REMOTE_WAKEUP   (1U << 5)

Supports remote wakeup.

Definition at line 240 of file usb_protocol.h.

#define USB_CONFIG_ATTR_SELF_POWERED   (1U << 6)

Self-powered.

Definition at line 239 of file usb_protocol.h.

#define USB_CONFIG_MAX_POWER ( ma   )     (((ma) + 1) / 2)

Max power in mA.

Definition at line 241 of file usb_protocol.h.


Enumeration Type Documentation

Standard USB descriptor types.

Definition at line 144 of file usb_protocol.h.

Standard USB device feature/status flags.

Definition at line 118 of file usb_protocol.h.

USB device speed. USB_SPEED_UNKNOWN indicates that the device has not yet seen a reset (i.e. it is in the POWERED or the ATTACHED state, possibly suspended.)

Definition at line 72 of file usb_protocol.h.

USB device state. See the device state diagram in the USB 2.0 specification for more information.

Definition at line 53 of file usb_protocol.h.

Standard USB endpoint feature/status flags.

Definition at line 126 of file usb_protocol.h.

Possible USB recipient codes (bmRequestType).

Definition at line 91 of file usb_protocol.h.

enum usb_reqid

Standard USB requests (bRequest).

Definition at line 101 of file usb_protocol.h.

Possible USB request types (bmRequestType).

Definition at line 82 of file usb_protocol.h.

Standard USB Test Mode Selectors

Definition at line 133 of file usb_protocol.h.


Variable Documentation

A USB Device request. The data payload of SETUP packets always follows this structure.

Standard USB device descriptor.

Standard USB device qualifier descriptor. This contains information about the device when running at the "other" speed (i.e. if the device is currently operating at high speed, this descriptor can be used to determine what would change if the device was operating at full speed.)

Standard USB configuration descriptor.

Standard USB interface descriptor.

Standard USB endpoint descriptor.


Generated on Tue Sep 15 10:22:03 2009 for libavr32 by  doxygen 1.5.8