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

📄 def.h

📁 电子称重的程序
💻 H
字号:
#ifndef __DEF_H__
#define __DEF_H__
#include <Reg52.h>
#ifndef ulong
#define ulong unsigned long
#endif
#ifndef Ulong
#define Ulong ulong
#endif
#ifndef uint
#define uint unsigned int
#endif
#ifndef Uint
#define Uint uint
#endif
#ifndef ushort
#define ushort unsigned short
#endif
#ifndef Ushort
#define Ushort ushort
#endif
#ifndef uchar
#define uchar unsigned char
#endif
#ifndef Uchar
#define Uchar uchar
#endif
#ifndef BOOL
#define BOOL bit
#endif
#ifndef ON
#define ON 1
#endif
#ifndef OFF
#define OFF 0
#endif
#ifndef HIGH
#define HIGH ON 
#endif
#ifndef LOW
#define LOW OFF
#endif
#ifndef ENABLE
#define ENABLE ON 
#endif
#ifndef DISABLE
#define DISABLE OFF
#endif

#ifndef TRUE
#define TRUE 1
#endif
#ifndef true
#define true TRUE
#endif

#ifndef FALSE
#define FALSE 0
#endif
#ifndef false
#define false FALSE
#endif

typedef struct
 {
	Uchar	filmode;
	Uchar	zeomode;
	Uchar	ztrmode;
 }FILSET;

typedef struct
 {
	Uchar	cSCap;
	Uchar	cSCapexp;
	Uchar	cSDiv;
	Uchar	cweight;
	float		rule;
	float		fSCap;
	float		fSDiv;
 }CALSET;
typedef struct
{
	Uchar	Unit;
	Uint		UnitOnOff;
	Uint		SysUnitOnOff;
}UNITSET;
typedef struct
{
	Ulong	linedot0;
	Ulong	linedot1;
	float		linerule0;
	float		linerule1;
}LINESET;

 typedef struct
 {
	Ulong	hov;
	Ulong	lov;
	uchar	mode;
}LIMMODE;
 typedef struct
 {
 	Uchar	flag;	
 }FUNSET;
typedef struct
{
	float		weight;
	float		tare;
	long		zero;
	long		ad;
}SCALENOW;
typedef struct
{
	float		SCapn;
	float		SCapl0;
	float 	SCapl1;
	float		SCapl2;
	float 	SCapl3;
	float		SCapl4;
}SCAPS;
typedef struct
{
	char		zero;
	Uchar	gain;
}ADCHIP;
typedef struct
{
	Uchar	baud;
	Uchar	add;
	Uchar	mode;
}COM;
typedef struct
{
 	Uchar	holdd;
 	Uchar	holdt;
 	float		holdweight;
}HOLDSET;
typedef struct
{
 	Uchar	* unitshow;
	float		unitn;
	char		dotm;
	Ulong	unitbit;
	Uchar	unitmode;
}UNITS;



#endif


⌨️ 快捷键说明

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