USBD ROM Stack  2.0
ROM based USB device stack
Data Structures | Macros | Typedefs
mw_usbd.h File Reference

Common definitions and declarations for the USB stack. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  WB_T
 
union  WORD_BYTE
 
struct  BM_T
 
union  REQUEST_TYPE
 
struct  USB_SETUP_PACKET
 
struct  USB_DEVICE_DESCRIPTOR
 
struct  USB_DEVICE_QUALIFIER_DESCRIPTOR
 
struct  USB_CONFIGURATION_DESCRIPTOR
 
struct  USB_INTERFACE_DESCRIPTOR
 
struct  USB_ENDPOINT_DESCRIPTOR
 
struct  USB_STRING_DESCRIPTOR
 
struct  USB_COMMON_DESCRIPTOR
 
struct  USB_OTHER_SPEED_CONFIGURATION
 
struct  USB_BOS_DESCRIPTOR
 
struct  USB_SS_DEVICE_CAPABILITY_DESCRIPTOR
 
struct  USB_DEVICE_CAPABILITY_DESCRIPTOR
 

Macros

#define USB_CONFIG_POWER_MA(mA)   ((mA) / 2)
 
#define USB_ENDPOINT_0_HS_MAXP   64
 
#define USB_ENDPOINT_0_LS_MAXP   8
 
#define USB_ENDPOINT_BULK_HS_MAXP   512
 
#define REQUEST_HOST_TO_DEVICE   0
 
#define REQUEST_DEVICE_TO_HOST   1
 
#define REQUEST_STANDARD   0
 
#define REQUEST_CLASS   1
 
#define REQUEST_VENDOR   2
 
#define REQUEST_RESERVED   3
 
#define REQUEST_TO_DEVICE   0
 
#define REQUEST_TO_INTERFACE   1
 
#define REQUEST_TO_ENDPOINT   2
 
#define REQUEST_TO_OTHER   3
 
#define USB_REQUEST_GET_STATUS   0
 
#define USB_REQUEST_CLEAR_FEATURE   1
 
#define USB_REQUEST_SET_FEATURE   3
 
#define USB_REQUEST_SET_ADDRESS   5
 
#define USB_REQUEST_GET_DESCRIPTOR   6
 
#define USB_REQUEST_SET_DESCRIPTOR   7
 
#define USB_REQUEST_GET_CONFIGURATION   8
 
#define USB_REQUEST_SET_CONFIGURATION   9
 
#define USB_REQUEST_GET_INTERFACE   10
 
#define USB_REQUEST_SET_INTERFACE   11
 
#define USB_REQUEST_SYNC_FRAME   12
 
#define USB_GETSTATUS_SELF_POWERED   0x01
 
#define USB_GETSTATUS_REMOTE_WAKEUP   0x02
 
#define USB_GETSTATUS_ENDPOINT_STALL   0x01
 
#define USB_FEATURE_ENDPOINT_STALL   0
 
#define USB_FEATURE_REMOTE_WAKEUP   1
 
#define USB_FEATURE_TEST_MODE   2
 
#define USB_DEVICE_DESCRIPTOR_TYPE   1
 
#define USB_CONFIGURATION_DESCRIPTOR_TYPE   2
 
#define USB_STRING_DESCRIPTOR_TYPE   3
 
#define USB_INTERFACE_DESCRIPTOR_TYPE   4
 
#define USB_ENDPOINT_DESCRIPTOR_TYPE   5
 
#define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE   6
 
#define USB_OTHER_SPEED_CONFIG_DESCRIPTOR_TYPE   7
 
#define USB_INTERFACE_POWER_DESCRIPTOR_TYPE   8
 
#define USB_OTG_DESCRIPTOR_TYPE   9
 
#define USB_DEBUG_DESCRIPTOR_TYPE   10
 
#define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE   11
 
#define USB_SECURITY_TYPE   12
 
#define USB_KEY_TYPE   13
 
#define USB_ENCRIPTION_TYPE   14
 
#define USB_BOS_TYPE   15
 
#define USB_DEVICE_CAPABILITY_TYPE   16
 
#define USB_WIRELESS_ENDPOINT_COMPANION_TYPE   17
 
#define USB_DEVICE_CLASS_RESERVED   0x00
 
#define USB_DEVICE_CLASS_AUDIO   0x01
 
#define USB_DEVICE_CLASS_COMMUNICATIONS   0x02
 
#define USB_DEVICE_CLASS_HUMAN_INTERFACE   0x03
 
#define USB_DEVICE_CLASS_MONITOR   0x04
 
#define USB_DEVICE_CLASS_PHYSICAL_INTERFACE   0x05
 
#define USB_DEVICE_CLASS_POWER   0x06
 
#define USB_DEVICE_CLASS_PRINTER   0x07
 
#define USB_DEVICE_CLASS_STORAGE   0x08
 
#define USB_DEVICE_CLASS_HUB   0x09
 
#define USB_DEVICE_CLASS_MISCELLANEOUS   0xEF
 
#define USB_DEVICE_CLASS_APP   0xFE
 
#define USB_DEVICE_CLASS_VENDOR_SPECIFIC   0xFF
 
#define USB_CONFIG_POWERED_MASK   0x40
 
#define USB_CONFIG_BUS_POWERED   0x80
 
#define USB_CONFIG_SELF_POWERED   0xC0
 
#define USB_CONFIG_REMOTE_WAKEUP   0x20
 
#define USB_ENDPOINT_DIRECTION_MASK   0x80
 
#define USB_ENDPOINT_OUT(addr)   ((addr) | 0x00)
 
#define USB_ENDPOINT_IN(addr)   ((addr) | 0x80)
 
#define USB_ENDPOINT_TYPE_MASK   0x03
 
#define USB_ENDPOINT_TYPE_CONTROL   0x00
 
#define USB_ENDPOINT_TYPE_ISOCHRONOUS   0x01
 
#define USB_ENDPOINT_TYPE_BULK   0x02
 
#define USB_ENDPOINT_TYPE_INTERRUPT   0x03
 
#define USB_ENDPOINT_SYNC_MASK   0x0C
 
#define USB_ENDPOINT_SYNC_NO_SYNCHRONIZATION   0x00
 
#define USB_ENDPOINT_SYNC_ASYNCHRONOUS   0x04
 
#define USB_ENDPOINT_SYNC_ADAPTIVE   0x08
 
#define USB_ENDPOINT_SYNC_SYNCHRONOUS   0x0C
 
#define USB_ENDPOINT_USAGE_MASK   0x30
 
#define USB_ENDPOINT_USAGE_DATA   0x00
 
#define USB_ENDPOINT_USAGE_FEEDBACK   0x10
 
#define USB_ENDPOINT_USAGE_IMPLICIT_FEEDBACK   0x20
 
#define USB_ENDPOINT_USAGE_RESERVED   0x30
 

Typedefs

typedef void * USBD_HANDLE_T
 

Detailed Description

Common definitions and declarations for the USB stack.

Common definitions and declarations for the USB stack.