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

📄 spmc_typedef.h

📁 基于SPMC75的NNAD_Flash K9F1208的驱动程式序,对一些需要存海量数据的单片机应用场合有用.
💻 H
字号:
/* ========================================================================= */
/* File Name   : Spmc_typedef.h											     */	
/* Description : SPMC data structure typedef						         */
/* Author      : Chih Ming Huang 											 */
/* Date        : May 2004											     	 */
/* Tools	   : u'nSP IDE tools v1.14.1 								     */
/* Version     : 1.00 													     */	
/* Security    : Confidential Proprietary 							         */
/* E-Mail      : laninlin@sunplus.com.tw,MaxHuang@sunplus.com.tw		     */
/* ========================================================================= */
#ifndef __SPMC_TYPEDEF_H
#define __SPMC_TYPEDEF_H

/*****************************************************************************/
/* Arithematic operation for u'nSP in C-language environment			     */
/*****************************************************************************/
#ifndef __BOOLEAN
	#define __BOOLEAN
	typedef unsigned char	Boolean;
#endif	

#ifndef __CHAR8
	#define __CHAR8
	typedef char	Char8;
#endif /* #ifndef _CHAR8 */

#ifndef _UINT8
	#define __UINT8
	typedef unsigned char	UInt8;
#endif /* #ifndef _UINT8 */	

#ifndef __INT8
	#define __INT8
	typedef signed char		Int8;
#endif /* #ifndef _INT8 */

#ifndef __SHORT16
	#define __SHORT16
	typedef short			Short16;
#endif /* #ifndef _SHORT16 */

#ifndef __INT16
	#define __INT16
	typedef int				Int16;
#endif /* #ifndef _INT16 */

#ifndef __UINT16
	#define __UINT16
	typedef unsigned int	UInt16;
#endif /* #ifndef _UINT16 */

#ifndef __INT32
	#define __INT32
	typedef long			Int32;
#endif /* #ifndef _INT32 */

#ifndef __UINT32
	#define __UINT32
	typedef unsigned long	UInt32;
#endif /* #ifndef _UINT32 */

#ifndef __FLOAT32
	#define __FLOAT32
	typedef float			Float32;
#endif /* #ifndef _FLOAT32 */

#ifndef __FLOAT64
	#define __FLOAT64
	typedef double			Float64;
#endif /* #ifndef _FLOAT64 */

/*****************************************************************************/
/* Derived Data Structure                                     			     */
/*****************************************************************************/
typedef union
{
    UInt16		W;
    struct
    {
        UInt16  _byte0      : 8;						    /* LSB byte code */
        UInt16  _byte1      : 8;						    /* MSB byte code */
    } Byte;
} UWORD;

typedef union
{
    Int16        W;
    struct
    {
        UInt16	_byte0      : 8;						    /* LSB byte code */
        Int16	_byte1      : 8;						    /* MSB byte code */
    } Byte;
} SWORD;

typedef union
{
    UInt32		Long;
    struct
    {
        UInt16  _word0      : 16;						    /* LSB word code */
        UInt16  _word1		: 16;						    /* MSB word code */
    } W;
    struct
    {
        UInt16  _byte0      : 8;						      /* bit 7  ~  0 */
        UInt16  _byte1      : 8;						      /* bit 15 ~  8 */
        UInt16  _byte2      : 8;						      /* bit 23 ~ 16 */	
        UInt16  _byte3      : 8;						      /* bit 31 ~ 24 */
    } Byte;
} ULONG;

typedef union
{
    Int32    Long;
    struct
    {
        UInt16  _word0      : 16;						    /* LSB word code */
        Int16   _word1      : 16;						    /* MSB word code */
    } W;
    struct
    {
        UInt16  _byte0      : 8;						      /* bit  7 ~  0 */
        UInt16  _byte1      : 8;						      /* bit 15 ~  8 */
        UInt16  _byte2      : 8;						      /* bit 23 ~ 16 */ 
        Int16   _byte3      : 8;						      /* bit 31 ~ 24 */
    } Byte;
} SLONG;

#endif /* #ifndef __SPMC_TYPEDEF_H */

⌨️ 快捷键说明

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