main.h
来自「结构清晰的单片机定时器实现时钟 闹钟 调时等功能」· C头文件 代码 · 共 87 行
H
87 行
#ifndef _MAIN_H
//--------------------------------------------------------------------------------
#define _MAIN_H
//--------------------------------------------------
// Global data type re_define
//--------------------------------------------------
typedef unsigned char UINT8;
typedef unsigned int UINT16;
typedef bit bool;
//--------------------------------------------------
// Basic Settings
//--------------------------------------------------
#define _Use_Second_Modify _DISABLE//_ENABLE
//--------------------------------------------------
// Definitions of Bits
//--------------------------------------------------
#define _ZERO 0x00
#define _BIT0 0x01
#define _BIT1 0x02
#define _BIT2 0x04
#define _BIT3 0x08
#define _BIT4 0x10
#define _BIT5 0x20
#define _BIT6 0x40
#define _BIT7 0x80
//--------------------------------------------------
// Definations of Physical Boolean
//--------------------------------------------------
#define _TRUE 1
#define _FALSE 0
#define _ENABLE 1
#define _DISABLE 0
#define _ON 1
#define _OFF 0
#define _SUCCESS 1
#define _FAIL 0
#define _YES 1
#define _NO 0
#define NULL ((void (*)(void))0) //a pointer :point a function with void parameter and void feed back value
//--------------------------------------------------
//============definition of declaration============
//--------------------------------------------------
#ifdef _MAIN_C
#define EXTERN
#else
#define EXTERN extern
#endif
//--------------------------------------------------
// Extern Global Variables
//--------------------------------------------------
EXTERN UINT8 code seg_code[12];//0xbf Display "-";
EXTERN UINT8 code bit_code[8];
//--------------------------------------------------
// Extern Global Variables
//--------------------------------------------------
EXTERN UINT8 ucBitFlag; //define a UINT8 variable for system bit flags
//--------------------------------------------------
// Extern Function Prototypes
//--------------------------------------------------
EXTERN void SystemInit(void);
EXTERN void Display(void);
EXTERN void Delay(void);
//--------------------------------------------------
#undef EXTERN
//--------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?