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

📄 share.h

📁 在单片机通过软件建立定时器
💻 H
字号:
/********************************************************************
*Copyright-(c)-2004,                                                *
*All rights reserved.                                               *
*                                                                   *
* 文件名称: SHARE.H                                                *
* 摘要    : 公共参数定义                                           *
*                                                                   *
* 当前版本: 0.1                                                    *
* 作者    : Liy-tj                                                 *
* 完成日期: 2004年8月4日                                           *
*********************************************************************/

/********************************************************************
                           全局变量外部引用
*********************************************************************/
#ifdef   SHARE_GLOBALS
#define  SHARE_EXT
#else
#define  SHARE_EXT extern
#endif

/***************************宏定义***********************************/
#ifndef  FALSE
#define  FALSE          0
#endif

#ifndef  TRUE
#define  TRUE           1
#endif

#ifndef  NO
#define  NO             FALSE
#endif

#ifndef  YES
#define  YES            TRUE
#endif

#ifndef  ON
#define  ON             TRUE
#endif

#ifndef  OFF
#define  OFF            FALSE
#endif

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

#ifndef PAI                    
#define PAI             3.1415926
#endif

#ifndef PREC
#define PREC             1E-5
#endif

/********************************************************************
                           数据类型定义
*********************************************************************/
typedef unsigned char         BOOLEAN;
typedef unsigned char         INT8U;
typedef signed   char         INT8S;
typedef unsigned int          INT16U;
typedef signed   int          INT16S;
typedef unsigned long         INT32U;
typedef signed   long         INT32S;
typedef float                 FP;
typedef double                FP64;

/********************************************************************
                           定义标准的位
*********************************************************************/
#define BIT0                  0x0001
#define BIT1                  0x0002
#define BIT2                  0x0004
#define BIT3                  0x0008
#define BIT4                  0x0010
#define BIT5                  0x0020
#define BIT6                  0x0040
#define BIT7                  0x0080
#define BIT8                  0x0100
#define BIT9                  0x0200
#define BITA                  0x0400
#define BITB                  0x0800
#define BITC                  0x1000
#define BITD                  0x2000
#define BITE                  0x4000
#define BITF                  0x8000

⌨️ 快捷键说明

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