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

📄 sprdef.h

📁 epson usb2.0 控制芯片 S1R72V05 固件程序。
💻 H
字号:
/*
 *	description : Sapporo coding rule
 *	Maker		: Michiru.Kagaya
 *	Copyright	: (C)2003,SEIKO EPSON Corp. All Rights Reserved.
 */

#ifndef SPRDEF_H
#define SPRDEF_H

#ifdef __cplusplus
	extern "C" {
#endif /* cplusplus */

#ifdef TOPPERS_C
	#include "kernel.h"
#endif

/* void */
typedef void			VOID;
typedef void *			PVOID;

/* 8bit */
typedef char			      CHAR;
typedef unsigned char	      UCHAR;
typedef CHAR *			PCHAR;
typedef UCHAR *			PUCHAR;
/* 16bit */
typedef short			SHORT;
typedef unsigned short	USHORT;
typedef SHORT*			PSHORT;
typedef USHORT*			PUSHORT;
/* 32bit */
typedef long			LONG;
typedef unsigned long	ULONG;
typedef long*			PLONG;
typedef ULONG*			PULONG;

typedef int*			PINT;
typedef unsigned int*	PUINT;

#ifndef ITRON_C
	typedef int				INT;
	typedef unsigned int	UINT;
#endif /* ITRON_C */

#ifndef ITRON_C

	typedef unsigned char BOOL;

#endif /* ITRON_C */

#ifndef FALSE
	#define FALSE 0
#endif	/* FALSE */

#ifndef TRUE
	#define TRUE 1
#endif	/* TRUE */

#ifndef NULL
	#ifdef __cplusplus	/* __cplusplus == Defined for C++ programs only. */
		#define NULL 0
	#else
		#define NULL ((void *)0)
	#endif /* __cpulusplus */
#endif /* NULL */


#define LOWORD( l ) 		((USHORT)(l))
#define HIWORD( l ) 		((USHORT)(((ULONG)(l) >> 16) & 0xFFFF ))
#define LOBYTE( w ) 		((UCHAR)((w) & 0xFF))
#define HIBYTE( w ) 		((UCHAR)(((USHORT)(w) >> 8 ) & 0xFF ))
#define MAKEWORD( a, b )	((USHORT)(((UCHAR)(a)) | ((USHORT)((UCHAR)(b))) << 8))
#define MAKEDWORD( a, b )	((ULONG)(((USHORT)(a)) | ((ULONG)((USHORT)(b))) << 16))
#define MAKEBTODW( a )		((ULONG)((((*(a)<<24)|(*((a)+1)<<16)) | (*((a)+2) << 8))|*((a)+3)))
#define MAKEDWTOB( a, b )	*(a)	 = (UCHAR)((b) >> 24) & 0xFF; \
							*((a)+1) = (UCHAR)((b) >> 16) & 0xFF; \
							*((a)+2) = (UCHAR)((b) >>  8) & 0xFF; \
							*((a)+3) = (UCHAR)(b) & 0xFF;


#define MAX( a, b )			(((a)>(b)) ? (a) : (b))
#define MIN( a, b )			(((a)<(b)) ? (a) : (b))


#define SWAP16( sw )		(((sw)>>8) & 0x00ff) | (((sw)<<8) & 0xff00)
#define SWAP32( sw )		(((sw)>>24) & 0x000000ff) | (((sw)>>8) & 0x0000ff00) |	\
							(((sw)<<24) & 0xff000000) | (((sw)<<8) & 0x00ff0000)



#ifndef IN
	#define IN
#endif /* IN */

#ifndef OUT
	#define OUT
#endif /* OUT */

/* Inline */
#ifndef TOPPERS_C
	#define	Inline		extern __inline
#endif

/* CALLBACK function */
typedef LONG ( *CALLBACK_PROC )( ULONG lParam0, ULONG lParam1, VOID *pParam );


#ifdef __cplusplus
	}
#endif /* cplusplus */

#endif /* SPRDEF_H */

⌨️ 快捷键说明

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