USB Host Shield 2.0
Classes | Macros
usb_ch9.h File Reference

Go to the source code of this file.

Classes

struct  USB_DEVICE_DESCRIPTOR
 
struct  USB_CONFIGURATION_DESCRIPTOR
 
struct  USB_INTERFACE_DESCRIPTOR
 
struct  USB_ENDPOINT_DESCRIPTOR
 
struct  USB_HID_DESCRIPTOR
 
struct  HID_CLASS_DESCRIPTOR_LEN_AND_TYPE
 

Macros

#define DEV_DESCR_LEN   18
 
#define CONF_DESCR_LEN   9
 
#define INTR_DESCR_LEN   9
 
#define EP_DESCR_LEN   7
 
#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_SYNCH_FRAME   12
 
#define USB_FEATURE_ENDPOINT_HALT   0
 
#define USB_FEATURE_DEVICE_REMOTE_WAKEUP   1
 
#define USB_FEATURE_TEST_MODE   2
 
#define USB_SETUP_HOST_TO_DEVICE   0x00
 
#define USB_SETUP_DEVICE_TO_HOST   0x80
 
#define USB_SETUP_TYPE_STANDARD   0x00
 
#define USB_SETUP_TYPE_CLASS   0x20
 
#define USB_SETUP_TYPE_VENDOR   0x40
 
#define USB_SETUP_RECIPIENT_DEVICE   0x00
 
#define USB_SETUP_RECIPIENT_INTERFACE   0x01
 
#define USB_SETUP_RECIPIENT_ENDPOINT   0x02
 
#define USB_SETUP_RECIPIENT_OTHER   0x03
 
#define USB_DESCRIPTOR_DEVICE   0x01
 
#define USB_DESCRIPTOR_CONFIGURATION   0x02
 
#define USB_DESCRIPTOR_STRING   0x03
 
#define USB_DESCRIPTOR_INTERFACE   0x04
 
#define USB_DESCRIPTOR_ENDPOINT   0x05
 
#define USB_DESCRIPTOR_DEVICE_QUALIFIER   0x06
 
#define USB_DESCRIPTOR_OTHER_SPEED   0x07
 
#define USB_DESCRIPTOR_INTERFACE_POWER   0x08
 
#define USB_DESCRIPTOR_OTG   0x09
 
#define HID_DESCRIPTOR_HID   0x21
 
#define OTG_FEATURE_B_HNP_ENABLE   3
 
#define OTG_FEATURE_A_HNP_SUPPORT   4
 
#define OTG_FEATURE_A_ALT_HNP_SUPPORT   5
 
#define USB_TRANSFER_TYPE_CONTROL   0x00
 
#define USB_TRANSFER_TYPE_ISOCHRONOUS   0x01
 
#define USB_TRANSFER_TYPE_BULK   0x02
 
#define USB_TRANSFER_TYPE_INTERRUPT   0x03
 
#define bmUSB_TRANSFER_TYPE   0x03
 
#define USB_FEATURE_ENDPOINT_STALL   0
 
#define USB_FEATURE_DEVICE_REMOTE_WAKEUP   1
 
#define USB_FEATURE_TEST_MODE   2
 

Macro Definition Documentation

◆ DEV_DESCR_LEN

#define DEV_DESCR_LEN   18

Definition at line 33 of file usb_ch9.h.

◆ CONF_DESCR_LEN

#define CONF_DESCR_LEN   9

Definition at line 34 of file usb_ch9.h.

◆ INTR_DESCR_LEN

#define INTR_DESCR_LEN   9

Definition at line 35 of file usb_ch9.h.

◆ EP_DESCR_LEN

#define EP_DESCR_LEN   7

Definition at line 36 of file usb_ch9.h.

◆ USB_REQUEST_GET_STATUS

#define USB_REQUEST_GET_STATUS   0

Definition at line 40 of file usb_ch9.h.

◆ USB_REQUEST_CLEAR_FEATURE

#define USB_REQUEST_CLEAR_FEATURE   1

Definition at line 41 of file usb_ch9.h.

◆ USB_REQUEST_SET_FEATURE

#define USB_REQUEST_SET_FEATURE   3

Definition at line 42 of file usb_ch9.h.

◆ USB_REQUEST_SET_ADDRESS

#define USB_REQUEST_SET_ADDRESS   5

Definition at line 43 of file usb_ch9.h.

◆ USB_REQUEST_GET_DESCRIPTOR

#define USB_REQUEST_GET_DESCRIPTOR   6

Definition at line 44 of file usb_ch9.h.

◆ USB_REQUEST_SET_DESCRIPTOR

#define USB_REQUEST_SET_DESCRIPTOR   7

Definition at line 45 of file usb_ch9.h.

◆ USB_REQUEST_GET_CONFIGURATION

#define USB_REQUEST_GET_CONFIGURATION   8

Definition at line 46 of file usb_ch9.h.

◆ USB_REQUEST_SET_CONFIGURATION

#define USB_REQUEST_SET_CONFIGURATION   9

Definition at line 47 of file usb_ch9.h.

◆ USB_REQUEST_GET_INTERFACE

#define USB_REQUEST_GET_INTERFACE   10

Definition at line 48 of file usb_ch9.h.

◆ USB_REQUEST_SET_INTERFACE

#define USB_REQUEST_SET_INTERFACE   11

Definition at line 49 of file usb_ch9.h.

◆ USB_REQUEST_SYNCH_FRAME

#define USB_REQUEST_SYNCH_FRAME   12

Definition at line 50 of file usb_ch9.h.

◆ USB_FEATURE_ENDPOINT_HALT

#define USB_FEATURE_ENDPOINT_HALT   0

Definition at line 52 of file usb_ch9.h.

◆ USB_FEATURE_DEVICE_REMOTE_WAKEUP [1/2]

#define USB_FEATURE_DEVICE_REMOTE_WAKEUP   1

Definition at line 99 of file usb_ch9.h.

◆ USB_FEATURE_TEST_MODE [1/2]

#define USB_FEATURE_TEST_MODE   2

Definition at line 100 of file usb_ch9.h.

◆ USB_SETUP_HOST_TO_DEVICE

#define USB_SETUP_HOST_TO_DEVICE   0x00

Definition at line 58 of file usb_ch9.h.

◆ USB_SETUP_DEVICE_TO_HOST

#define USB_SETUP_DEVICE_TO_HOST   0x80

Definition at line 59 of file usb_ch9.h.

◆ USB_SETUP_TYPE_STANDARD

#define USB_SETUP_TYPE_STANDARD   0x00

Definition at line 60 of file usb_ch9.h.

◆ USB_SETUP_TYPE_CLASS

#define USB_SETUP_TYPE_CLASS   0x20

Definition at line 61 of file usb_ch9.h.

◆ USB_SETUP_TYPE_VENDOR

#define USB_SETUP_TYPE_VENDOR   0x40

Definition at line 62 of file usb_ch9.h.

◆ USB_SETUP_RECIPIENT_DEVICE

#define USB_SETUP_RECIPIENT_DEVICE   0x00

Definition at line 63 of file usb_ch9.h.

◆ USB_SETUP_RECIPIENT_INTERFACE

#define USB_SETUP_RECIPIENT_INTERFACE   0x01

Definition at line 64 of file usb_ch9.h.

◆ USB_SETUP_RECIPIENT_ENDPOINT

#define USB_SETUP_RECIPIENT_ENDPOINT   0x02

Definition at line 65 of file usb_ch9.h.

◆ USB_SETUP_RECIPIENT_OTHER

#define USB_SETUP_RECIPIENT_OTHER   0x03

Definition at line 66 of file usb_ch9.h.

◆ USB_DESCRIPTOR_DEVICE

#define USB_DESCRIPTOR_DEVICE   0x01

Definition at line 70 of file usb_ch9.h.

◆ USB_DESCRIPTOR_CONFIGURATION

#define USB_DESCRIPTOR_CONFIGURATION   0x02

Definition at line 71 of file usb_ch9.h.

◆ USB_DESCRIPTOR_STRING

#define USB_DESCRIPTOR_STRING   0x03

Definition at line 72 of file usb_ch9.h.

◆ USB_DESCRIPTOR_INTERFACE

#define USB_DESCRIPTOR_INTERFACE   0x04

Definition at line 73 of file usb_ch9.h.

◆ USB_DESCRIPTOR_ENDPOINT

#define USB_DESCRIPTOR_ENDPOINT   0x05

Definition at line 74 of file usb_ch9.h.

◆ USB_DESCRIPTOR_DEVICE_QUALIFIER

#define USB_DESCRIPTOR_DEVICE_QUALIFIER   0x06

Definition at line 75 of file usb_ch9.h.

◆ USB_DESCRIPTOR_OTHER_SPEED

#define USB_DESCRIPTOR_OTHER_SPEED   0x07

Definition at line 76 of file usb_ch9.h.

◆ USB_DESCRIPTOR_INTERFACE_POWER

#define USB_DESCRIPTOR_INTERFACE_POWER   0x08

Definition at line 77 of file usb_ch9.h.

◆ USB_DESCRIPTOR_OTG

#define USB_DESCRIPTOR_OTG   0x09

Definition at line 78 of file usb_ch9.h.

◆ HID_DESCRIPTOR_HID

#define HID_DESCRIPTOR_HID   0x21

Definition at line 80 of file usb_ch9.h.

◆ OTG_FEATURE_B_HNP_ENABLE

#define OTG_FEATURE_B_HNP_ENABLE   3

Definition at line 85 of file usb_ch9.h.

◆ OTG_FEATURE_A_HNP_SUPPORT

#define OTG_FEATURE_A_HNP_SUPPORT   4

Definition at line 86 of file usb_ch9.h.

◆ OTG_FEATURE_A_ALT_HNP_SUPPORT

#define OTG_FEATURE_A_ALT_HNP_SUPPORT   5

Definition at line 87 of file usb_ch9.h.

◆ USB_TRANSFER_TYPE_CONTROL

#define USB_TRANSFER_TYPE_CONTROL   0x00

Definition at line 90 of file usb_ch9.h.

◆ USB_TRANSFER_TYPE_ISOCHRONOUS

#define USB_TRANSFER_TYPE_ISOCHRONOUS   0x01

Definition at line 91 of file usb_ch9.h.

◆ USB_TRANSFER_TYPE_BULK

#define USB_TRANSFER_TYPE_BULK   0x02

Definition at line 92 of file usb_ch9.h.

◆ USB_TRANSFER_TYPE_INTERRUPT

#define USB_TRANSFER_TYPE_INTERRUPT   0x03

Definition at line 93 of file usb_ch9.h.

◆ bmUSB_TRANSFER_TYPE

#define bmUSB_TRANSFER_TYPE   0x03

Definition at line 94 of file usb_ch9.h.

◆ USB_FEATURE_ENDPOINT_STALL

#define USB_FEATURE_ENDPOINT_STALL   0

Definition at line 98 of file usb_ch9.h.

◆ USB_FEATURE_DEVICE_REMOTE_WAKEUP [2/2]

#define USB_FEATURE_DEVICE_REMOTE_WAKEUP   1

Definition at line 99 of file usb_ch9.h.

◆ USB_FEATURE_TEST_MODE [2/2]

#define USB_FEATURE_TEST_MODE   2

Definition at line 100 of file usb_ch9.h.