123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- #ifndef USB_DEFS_H
- #define USB_DEFS_H
- #define PTR16(x) ((unsigned int)(((unsigned long)x) & 0xFFFF))
- #define E0SZ 16
- #define CDC_COMM_INTF_ID 0x00
- #define CDC_COMM_UEP UEP2
- #define CDC_INT_BD_IN ep2Bi
- #define CDC_INT_EP_SIZE 8
- #define CDC_DATA_INTF_ID 0x01
- #define CDC_DATA_UEP UEP3
- #define CDC_BULK_BD_OUT ep3Bo
- #define CDC_BULK_OUT_EP_SIZE 8
- #define CDC_BULK_BD_IN ep3Bi
- #define CDC_BULK_IN_EP_SIZE 8
- #define SEND_ENCAPSULATED_COMMAND 0x00
- #define GET_ENCAPSULATED_RESPONSE 0x01
- #define SET_COMM_FEATURE 0x02
- #define GET_COMM_FEATURE 0x03
- #define CLEAR_COMM_FEATURE 0x04
- #define SET_LINE_CODING 0x20
- #define GET_LINE_CODING 0x21
- #define SET_CONTROL_LINE_STATE 0x22
- #define SEND_BREAK 0x23
- #define NETWORK_CONNECTION 0x00
- #define RESPONSE_AVAILABLE 0x01
- #define SERIAL_STATE 0x20
- #define CDC_DEVICE 0x02
- #define COMM_INTF 0x02
- #define ABSTRACT_CONTROL_MODEL 0x02
- #define V25TER 0x01
- #define DATA_INTF 0x0A
- #define NO_PROTOCOL 0x00
- #define ABSTRACT_STATE 0x01
- #define COUNTRY_SETTING 0x02
- #define CS_INTERFACE 0x24
- #define CS_ENDPOINT 0x25
- #define DSC_FN_HEADER 0x00
- #define DSC_FN_CALL_MGT 0x01
- #define DSC_FN_ACM 0x02
- #define DSC_FN_DLM 0x03
- #define DSC_FN_TELEPHONE_RINGER 0x04
- #define DSC_FN_RPT_CAPABILITIES 0x05
- #define DSC_FN_UNION 0x06
- #define DSC_FN_COUNTRY_SELECTION 0x07
- #define DSC_FN_TEL_OP_MODES 0x08
- #define DSC_FN_USB_TERMINAL 0x09
- #define CDC_TX_READY 0
- #define CDC_TX_BUSY 1
- #define CDC_TX_BUSY_ZLP 2
- #define CDC_TX_COMPLETING 3
- #define LINE_CODING_LENGTH 0x07
- typedef struct _USB_CDC_HEADER_FN_DSC
- {
- unsigned char bFNLength;
- unsigned char bDscType;
- unsigned char bDscSubType;
- unsigned short bcdCDC;
- } USB_CDC_HEADER_FN_DSC;
- typedef struct _USB_CDC_ACM_FN_DSC
- {
- unsigned char bFNLength;
- unsigned char bDscType;
- unsigned char bDscSubType;
- unsigned char bmCapabilities;
- } USB_CDC_ACM_FN_DSC;
- typedef struct _USB_CDC_UNION_FN_DSC
- {
- unsigned char bFNLength;
- unsigned char bDscType;
- unsigned char bDscSubType;
- unsigned char bMasterIntf;
- unsigned char bSaveIntf0;
- } USB_CDC_UNION_FN_DSC;
- typedef struct _USB_CDC_CALL_MGT_FN_DSC
- {
- unsigned char bFNLength;
- unsigned char bDscType;
- unsigned char bDscSubType;
- unsigned char bmCapabilities;
- unsigned char bDataInterface;
- } USB_CDC_CALL_MGT_FN_DSC;
- #endif
|