📄 global.h
字号:
#define USB_DEFAULT 0 /* No descriptor read*/
#define USB_DESCRIPTOR_READ 1 /* Descriptor read, Addr not assigned*/
#define USB_ADDRESS_ASSIGNED 2 /* Descriptor Read, Addr assigned*/
#define USB_CONFIGURED 3
/*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 bRequest Values*/
#define GET_STATUS 0
#define CLEAR_FEATURE 1
#define SET_FEATURE 3
#define SET_ADDRESS 5
#define GET_DESCRIPTOR 6
#define SET_DESCRIPTOR 7
#define GET_CONFIGURATION 8
#define SET_CONFIGURATION 9
#define GET_INTERFACE 10
#define SET_INTERFACE 11
#define SYNCH_FRAME 12
#define REQ_DONE 0xFF /*private code: request done*/
/*Descriptor Types*/
#define DEVICE 1
#define CONFIGURATION 2
#define XSTRING 3
#define INTERFACE 4
#define ENDPOINT 5
/*
//Recipient Selectors/Masks
*/
#define RECIPIENT_MASK 0x1F
#define DEVICE_RECIPIENT 0
#define INTERFACE_RECIPIENT 1
#define ENDPOINT_RECIPIENT 2
#define OTHER_RECIPIENT 3
/*
//Feature Selectors
*/
#define DEVICE_REMOTE_WAKEUP 0x01
#define ENDPOINT_STALL 0x00
/*
//Equates for masking registers, addresses, and counters
*/
extern bit TOGGLE_Hub;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -