基于OHCI的USB主机 —— USB设备常量定义
生活随笔
收集整理的這篇文章主要介紹了
基于OHCI的USB主机 —— USB设备常量定义
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
USB設(shè)備枚舉過程中使用到的常量定義如下:
與50位技術(shù)專家面對面20年技術(shù)見證,附贈技術(shù)全景圖
| /*------------------------------------------------------------------------- ?* Standard Chapter 9 definition ?*------------------------------------------------------------------------- ?*/ #define GET_STATUS????? 0x00?????????????????????????????????????????????? ?????? ? #define CLEAR_FEATURE?? 0x01 #define SET_FEATURE???? 0x03 #define SET_ADDRESS???? 0x05 #define GET_DESCRIPTOR? 0x06 #define SET_DESCRIPTOR? 0x07 #define GET_CONFIG????? 0x08 #define SET_CONFIG????? 0x09 #define GET_INTERFACE?? 0x0a #define SET_INTERFACE?? 0x0b #define SYNCH_FRAME???? 0x0c ? #define DESC_DEVICE????????? 0x0100 #define DESC_CONFIGURATION?? 0x0200 #define DESC_STRING????????? 0x0300 #define DESC_INTERFACE?????? 0x0400 #define DESC_ENDPOINT??????? 0x0500? #define USB_BUF_SIZE 512? #define ENUM_DEV_IDLE????????????? 0 #define ENUM_DEV_SEND_DEV_DESC_0?? 1 #define ENUM_DEV_SET_ADDRESS?????? 2 #define ENUM_DEV_GET_DESC_CFG????? 3 #define ENUM_DEV_FILL_DESC_DEV???? 4 #define ENUM_DEV_SEND_DEV_DESC_1?? 5 #define ENUM_DEV_FILL_DESC_SET???? 6 #define ENUM_DEV_SET_INTERFACE???? 7 #define ENUM_DEV_SET_CONFIGURATION 8 #define ENUM_DEV_GET_CONFIGURATION 9 #define ENUM_DEV_CHECK_CONFIG????? 10 #define ENUM_DEV_CHECK_INTERFACE?? 11 #define ENUM_DEV_WAIT_CMD_OVER???? 12 #define ENUM_DEV_WAIT_RESET_OVER?? 13 #define ENUM_DEV_GET_MAX_LUN?????? 14 #define ENUM_DEV_CHECK_MAX_LUN???? 15 #define ENUM_DEV_RESET_ING???????? 16 #define ENUM_DEV_IDLE_DALAY??????? 17 #define ENUM_DEV_OVER????????????? 100? #define USB_CMD_OVER??????????? 100? #define DEV_ERROR_TD??????????? 1 #define DEV_ERROR_CONFIGURATION??? 2 #define DEV_ERROR_RESET_TIME_OUT?? 3? #define USB_DEV_ENUM_OK??????????? 1 #define USB_DEV_NOT_CONNECTED????? 2? #define CC_STALL??????????????? 4? #define DESC_TYPE_DEVICE??????? 1 #define DESC_TYPE_CONFIG??????? 2 #define DESC_TYPE_INTERFACE??????? 3 #define DESC_TYPE_END_POINT??????? 4? typedef struct _ENUM_USB_DEV { ??? unsigned char state; ??? unsigned char newState; ??? unsigned char oldState; ??? //unsigned char count; ??? unsigned char errReason; ??? //unsigned int delay; }ENUM_USB_DEV; |
總結(jié)
以上是生活随笔為你收集整理的基于OHCI的USB主机 —— USB设备常量定义的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: WinForm中给DataGridVie
- 下一篇: [图示]做人36字诀:二)形象塑造 ——