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

📄 portable.h

📁 usb driver, sample for usb driver develop. rised for reference
💻 H
字号:
/***************************************************************************
* C Source Header File:  PORTABLE.H
*
* Copyright 2001 DeVaSys
* All rights are reserved.
* No part of this document may be reproduced, stored, or transmitted in any
* form or by any means without the prior written permission of DeVaSys
*
* Description:
*
* This header contains general declarations and defines intended to
* provide increased code portability.
*
* ........................ Revision History ................................
*
* Creation date: 02/22/2001 - Michael A. DeVault, DeVaSys
*
* Revision History Summary:
*
* Rev 1.0   22 February 2001 12:00:00   mad
*   Initial revision.
*
***************************************************************************/
/* following ifndef is for skipping double includes of this header file */
#if !defined(__PORTABLE_H)
	#define __PORTABLE_H

#if (defined(__BORLANDC__) | defined(_MSC_VER))
	/* borland compiler defines (allow for compile testing with borland) */
	#define code
	#define data
	#define xdata
	#define packed
#else
	/* keil compiler defines (allow for compile with keil) */
	#define __BIGENDIAN__
	#define packed
#endif

typedef unsigned char  BOOL;
typedef unsigned char  BYTE;
typedef unsigned short WORD;
typedef unsigned long	 LWORD;


#define FAILURE (0)
#define SUCCESS (1)

#define FALSE (0)
#define TRUE (1)

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

#define LOBYTE(w) ((w)&0xff)
#define HIBYTE(w) (((w)>>8)&0xff)
#define LOWORD(l) ((l)&0xffff)
#define HIWORD(l) (((l)>>16)&0xffff)

/* used to handle differences in BIG_ENDIAN & LITTLE_ENDIAN formats */

#ifdef __BIGENDIAN__
	#define SWAPWORD(x)   ( (((x) << 8) & 0xFF00) | (((x) >> 8) & 0x00FF) )
//	#define SWAPWORD(x)   ((((x) & 0xFF) << 8) | (((x) >> 8) & 0xFF))
#else
	#define SWAPWORD(x)   (x)
#endif



/* following endif is for skipping double includes of this header file */
#endif

⌨️ 快捷键说明

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