⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defusb.h

📁 linux操作系统下的串口驱动程序 linux操作系统下的串口驱动程序
💻 H
字号:
#define USB_DEFAULT                 0x00    /* No descriptor read*/#define USB_DESCRIPTOR_READ         0x01    /* Descriptor read, Addr not assigned*/#define USB_ADDRESS_ASSIGNED        0x02    /* Descriptor Read, Addr assigned*/#define USB_CONFIGURED              0x03/*GLOBAL STATUS VALUES*/#define STD_COMMAND                 0x00#define SETUP_COMMAND_PHASE         0x40#define FUNCTION_ERROR              0x7F    /* Used when we are stalling the function EP0 */#define HUB_ERROR                   0xFF    /* Used when we are stalling the HUB EP0 *//*1.0 Request Values*/#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_CONFIGURATION           0x08#define SET_CONFIGURATION           0x09#define GET_INTERFACE               0x0A#define SET_INTERFACE               0x0B#define SYNCH_FRAME                 0x0C/*HID Request Values*/#define GET_REPORT                  0x01#define GET_IDLE                    0x02#define GET_PROTOCOL                0x03#define SET_REPORT                  0x09#define SET_IDLE                    0x0A#define SET_PROTOCOL                0x0B/*Descriptor Types*/#define DEVICE                      0x01#define CONFIGURATION               0x02#define XSTRING                     0x03#define INTERFACE                   0x04#define ENDPOINT                    0x05#define HID                         0x21#define HIDREPORT                   0x22#define HIDPHYSICAL                 0x23/*Lengths of various descriptor segments*/#define DEV_LENGTH                  18      /*length of device desc.  */#define CFG_LENGTH                  9       /*length of cfg. desc. seg*/#define INT_LENGTH                  9       /*length of int. desc. seg*/#define HID_LENGTH                  9       /*length of HID  desc. seg*/#define END_LENGTH                  7       /*length of end. desc. seg*//*Class codes*/#define HIDCLASS                    0x03#define NOSUBCLASS                  0x00#define BOOTSUBCLASS                0x01#define VENDORSPEC                  0xFF/*Recipient Selectors/Masks*/#define RECIPIENT_MASK              0x1F#define DEVICE_RECIPIENT            0x00#define INTERFACE_RECIPIENT         0x01#define ENDPOINT_RECIPIENT          0x02#define OTHER_RECIPIENT             0x03/*Feature Selectors*/#define DEVICE_REMOTE_WAKEUP        0x01#define ENDPOINT_STALL              0x00/*initialize the clock generator to output 4MHz*//*USB clock divisor*/#define CLKDIV   5/*ALTMSK if not in suspend*/#define NORMAL_ALTMSK SD3+RESET_A/* Enforce a minimum time period active before suspending to make sure*//* that the board is detected at power on and restart.  The value here*//* corresponds to the minimum number of time periods between suspend  *//* events.  At half-second intervals, the value here equals 2 seconds */#define SUSPND_TO 4/*Medeli Vendor Request Values*/#define SEND_COMMAND                0xF0#define READ_STATUS                 0xF1/*Vendor Operations*/#define FORMAT			0x80#define RESET			0x8B#define ROOT				0x82#define MEM				0x8C#define DOWNLOAD_FILE	0x84#define UPLOAD_FI		0x89#define RENAME			0x88#define DEL				0x85/*1st Byte*/#define WaitForComm 	0XFF	//PC机可以发送命令#define WaitForData		0X10	//PC机可以发送数据/*2st Byte*/#define CF_NO			0X00	//播放器没有外部CF卡#define CF_YES			0X01	//播放器有外部CF卡/*3st Byte*/#define OnBoardFalsh_NO		0X00	//播放器没有内部FLASH#define OnBoardFalsh_YES	0X01	//播放器有内部FLASH/*4st Byte*/#define Player_OK			0X00	//播放器运行正常#define Player_STALL		0X01	//播放器运行出错#define MEMSPACE (8*1024) //the total space on the disk

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -