📄 ha_usbcommon.h
字号:
/********************************************************************************************************
Module Name:
HA_usbcommon.h
Description:
This is a header file for usb definition which are not yet
a standard system header file.
Revision History:
Version DATE Author Comments
1.0 2003.7.17 lmq initial creation
*********************************************************************************************************/
//**********************************************************************************************************
//I N C L U D E
//**********************************************************************************************************
#include "HA_TypeDef.h"
//**********************************************************************************************************
// D E F I N E S
//**********************************************************************************************************
#ifndef _HA_usbcommon_h
#define _HA_usbcommon_h
//
// ep0out_setup_bmRequestType Register
//
#define descty 0x1f
#define reqty 0x60
#define dir 0x80
//
//app_intr reg bit
//
#define setup 0x01
#define in 0x02
#define out 0x04
#define ping 0x08
#define traerr 0x10
#define ack 0x20
#define stcov 0x40
#define ctraerr 0x80
//
//ep_info reg bit
//
#define ep0out 0x00
#define ep0in 0x01
#define ep1out 0x02
#define ep1in 0x03
#define ep2out 0x04
#define ep2in 0x05
//**************************************************************************************
//linux parameter
//**************************************************************************************
//
// error code
//
#define ENODEV 19 /* No such device */
#define EBUSY 16 /* Device or resource busy */
#define NULL ((void *) 0)
#define EINVAL 22
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
#define INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
struct list_head {
struct list_head *next, *prev;
};
//
// T H E R E G I S T E R O F U S B D E V I C E
//
//**********************************************************************************************************
// T Y P E D E F S
//**********************************************************************************************************
typedef U16 __u16;
typedef U32 __u32;
typedef U8 u8;
typedef U8 __u8;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -