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

📄 common.h

📁 利用MCS-51单片机和USB接口芯片
💻 H
字号:
///////////////////////////////////////////////////////

#define NULL		0
#define TRUE   		1
#define FALSE  		0

#define UARTBUF_LENGTH  16384//520//
#define BUFFER_LENGTH	8192//520 //
#define MAX_READ_LENGTH 16384//1024//
#define MAX_WRITE_LENGTH 2048//1024//
// Disable all interrupts
#define DISABLE_INTERRUPTS		EA = 0
// Enable all interrupts
#define ENABLE_INTERRUPTS		EA = 1

typedef unsigned char       INT8;
typedef unsigned short      INT16;
typedef unsigned long       INT32;
//USB事件标志
typedef union __FLAGS
{
	struct _FLAGS
	{
		unsigned char   SLAVE_IS_ATTACHED	;
		unsigned char   SLAVE_REMOVED		;
		unsigned char  	SLAVE_FOUND		;	// Slave USB device found
		unsigned char  	SLAVE_ENUMERATED	;	// slave USB device enumeration done
		unsigned char   SLAVE_ONLINE		;
		unsigned char 	TIMEOUT_ERR		;				// timeout error during data endpoint transfer
		unsigned char	DATA_STOP		;					// device unplugged during data transfer
		unsigned char 	bData1			;
		unsigned char 	bUartInDone		;		
		unsigned char 	bMassDevice		;
		
	} bits;
	
} FLAGS;

⌨️ 快捷键说明

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