usb_type.h

来自「USB CDC and HID composite unit.」· C头文件 代码 · 共 59 行

H
59
字号
//-----------------------------------------------------------------------------
// USB_Type.h
//-----------------------------------------------------------------------------

#ifndef	USB_TYPE_H
#define USB_TYPE_H

// Select one of appropriate include file for the device

//#include <C8051F320.h>
#include <C8051F340.h>

// Compiler specific definition

#if defined(__C51__) || defined(__CX51__)

	#define KEIL
	#define BIG_ENDIAN			// high byte first

#elif defined SDCC

	#define LITTLE_ENDIAN		// low byte first

#endif

// basic type definition
typedef unsigned char   BYTE;
typedef unsigned int    UINT;
typedef unsigned long   ULONG;

// WORD type definition
typedef union {UINT i; BYTE c[2];} WORD;

#if defined BIG_ENDIAN

	#define MSB		0
	#define LSB		1

#else					// little endian - low byte first

	#define MSB		1
	#define LSB		0

#endif // end of BIG_ENDIAN

// boolean
#define FALSE	0
#define TRUE	1

#ifndef NULL
	#define NULL ((void *) 0)
#endif

#endif	/* USB_TYPE_H */

//-----------------------------------------------------------------------------
// End Of File
//-----------------------------------------------------------------------------

⌨️ 快捷键说明

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