#ifndef __DS1302_H__
#define __DS1302_H__
#include <STC12C5A60S2.H>
#include <STDIO.H>
#include <INTRINS.H>
#ifndef __TYPE__
#define __TYPE__
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long ulong;
#endif
#ifndef __DEF__
#define __DEF__
#define u8 unsigned char
#define u16 unsigned int
#define u32 unsigned long
#endif
#ifndef __XIANSHI_ZIXINGKU__
#define __XIANSHI_ZIXINGKU__
/****************共阴数码管数字字形库******************************************/
code uchar smg_duan[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};
/****************显示位数据缓存库**********************************************/
code uchar smg_wei0[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
code uchar smg_wei1[]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
#endif
上面是一个DS1302的模块,已经做了防重复包含,但在编译时出现下面的错误提示,这是为什么呢?
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: smg_wei1
MODULE: DS1302.obj (DS1302)
DEFINED: TYN_KZQ_STC12C5A60S2_CX.obj (TYN_KZQ_STC12C5A60S2_CX) |