avrusb.h

来自「基于AVR的USB单片机的源代码,其中部分代码被用在产品上.」· C头文件 代码 · 共 65 行

H
65
字号
//===================================================================//
//					Augest, 25, 2002		The Last Modified Date
//===================================================================//


#ifndef __AVRUSB_H__
#define __AVRUSB_H__

#include <io8515v.h>
#include <macros.h>

#include "HAL.H"
#include "USBD12.H"
#include "USB110.H"
#include "USB.H"
#include "CHAP9.H"
#include "VDOR.H"



/**************************************************************************/
/* macro                                                                  */
/**************************************************************************/

#define MSB(x)    (((x) >> 8) & 0xFF)
#define LSB(x)    ((x) & 0xFF)

#define FALSE   0
#define TRUE    (!FALSE)
#define true    TRUE
#define false   FALSE

#define DISABLE_INTERRUPTS		CLI()
#define ENABLE_INTERRUPTS		SEI()

#define DMA_IDLE	0
#define DMA_RUNNING	1
#define DMA_PENDING	2

typedef union _ZBOARD_FLAGS
{
	struct _FLAGS
	{
		unsigned  bTimer               	: 1;
		unsigned  bBus_Reset           	: 1;
		unsigned  bSuspend             	: 1;
		unsigned  bSetup_Packet  	  	: 1;
		unsigned  bRemote_Wakeup		: 1;
		unsigned  bIN_ISR		      	: 1;
		unsigned  bControl_State		: 2;

		unsigned  bConfiguration		: 1;
		unsigned  bVerbose				: 1;
		unsigned  bEP1_RxDone			: 1;
		unsigned  bDMA_State      		: 2;
		unsigned  bLED					: 2; // Used for LED
		unsigned  bRead					: 1; // TRUE = Read, FALSE = Write. Now this bit is not used, just reserved for future usage.
	} bits;
	unsigned short nValue;
} AVRUSBFLAGS;


#endif /*__AVRUSB_H__*/

⌨️ 快捷键说明

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