libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
usbstd.h File Reference
#include <stdint.h>
#include <libopencm3/cm3/common.h>
Include dependency graph for usbstd.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_data
 
struct  usb_device_descriptor
 
struct  usb_device_qualifier_descriptor
 
struct  usb_interface
 
struct  usb_config_descriptor
 
struct  usb_interface_descriptor
 
struct  usb_endpoint_descriptor
 
struct  usb_string_descriptor
 
struct  usb_iface_assoc_descriptor
 

Macros

#define USB_CLASS_VENDOR   0xFF
 
#define USB_REQ_TYPE_DIRECTION   0x80
 
#define USB_REQ_TYPE_IN   0x80
 
#define USB_REQ_TYPE_OUT   0x0
 
#define USB_REQ_TYPE_TYPE   0x60
 
#define USB_REQ_TYPE_STANDARD   0x00
 
#define USB_REQ_TYPE_CLASS   0x20
 
#define USB_REQ_TYPE_VENDOR   0x40
 
#define USB_REQ_TYPE_RECIPIENT   0x1F
 
#define USB_REQ_TYPE_DEVICE   0x00
 
#define USB_REQ_TYPE_INTERFACE   0x01
 
#define USB_REQ_TYPE_ENDPOINT   0x02
 
#define USB_REQ_TYPE_OTHER   0x03
 
#define USB_REQ_GET_STATUS   0
 
#define USB_REQ_CLEAR_FEATURE   1
 
#define USB_REQ_SET_FEATURE   3
 
#define USB_REQ_SET_ADDRESS   5
 
#define USB_REQ_GET_DESCRIPTOR   6
 
#define USB_REQ_SET_DESCRIPTOR   7
 
#define USB_REQ_GET_CONFIGURATION   8
 
#define USB_REQ_SET_CONFIGURATION   9
 
#define USB_REQ_GET_INTERFACE   10
 
#define USB_REQ_SET_INTERFACE   11
 
#define USB_REQ_SET_SYNCH_FRAME   12
 
#define USB_DT_DEVICE   1
 
#define USB_DT_CONFIGURATION   2
 
#define USB_DT_STRING   3
 
#define USB_DT_INTERFACE   4
 
#define USB_DT_ENDPOINT   5
 
#define USB_DT_DEVICE_QUALIFIER   6
 
#define USB_DT_OTHER_SPEED_CONFIGURATION   7
 
#define USB_DT_INTERFACE_POWER   8
 
#define USB_DT_OTG   9
 
#define USB_DT_DEBUG   10
 
#define USB_DT_INTERFACE_ASSOCIATION   11
 
#define USB_FEAT_ENDPOINT_HALT   0
 
#define USB_FEAT_DEVICE_REMOTE_WAKEUP   1
 
#define USB_FEAT_TEST_MODE   2
 
#define USB_DEV_STATUS_SELF_POWERED   0x01
 
#define USB_DEV_STATUS_REMOTE_WAKEUP   0x02
 
#define USB_DT_DEVICE_SIZE   sizeof(struct usb_device_descriptor)
 
#define USB_DT_CONFIGURATION_SIZE   9
 
#define USB_CONFIG_ATTR_DEFAULT   0x80 /** always required (USB2.0 table 9-10) */
 
#define USB_CONFIG_ATTR_SELF_POWERED   0x40
 
#define USB_CONFIG_ATTR_REMOTE_WAKEUP   0x20
 
#define USB_DT_INTERFACE_SIZE   9
 
#define USB_DT_ENDPOINT_SIZE   7
 
#define USB_ENDPOINT_ADDR_OUT(x)   (x)
 
#define USB_ENDPOINT_ADDR_IN(x)   (0x80 | (x))
 
#define USB_ENDPOINT_ATTR_CONTROL   0x00
 
#define USB_ENDPOINT_ATTR_ISOCHRONOUS   0x01
 
#define USB_ENDPOINT_ATTR_BULK   0x02
 
#define USB_ENDPOINT_ATTR_INTERRUPT   0x03
 
#define USB_ENDPOINT_ATTR_TYPE   0x03
 
#define USB_ENDPOINT_ATTR_NOSYNC   0x00
 
#define USB_ENDPOINT_ATTR_ASYNC   0x04
 
#define USB_ENDPOINT_ATTR_ADAPTIVE   0x08
 
#define USB_ENDPOINT_ATTR_SYNC   0x0C
 
#define USB_ENDPOINT_ATTR_SYNCTYPE   0x0C
 
#define USB_ENDPOINT_ATTR_DATA   0x00
 
#define USB_ENDPOINT_ATTR_FEEDBACK   0x10
 
#define USB_ENDPOINT_ATTR_IMPLICIT_FEEDBACK_DATA   0x20
 
#define USB_ENDPOINT_ATTR_USAGETYPE   0x30
 
#define USB_DT_INTERFACE_ASSOCIATION_SIZE    sizeof(struct usb_iface_assoc_descriptor)
 

Enumerations

enum  usb_language_id { USB_LANGID_ENGLISH_US = 0x409 }