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

📄 const.h

📁 开发环境:ADS 1.2/SDT 2.51 GUI测试
💻 H
字号:
/*
 * Module: CONST.H 		初始化常量定义	
 * Programed by: ZHI-XIONG PENG
 * Programed on: Date: 2004-11-24 14:45
 * Modified  by:
 * Modified  on: Date:
 * Copyright (c) LONGFLY SHAOGUAN Inc. All rights reserved
 */

#ifndef CONST_HEADER_FILE
#define CONST_HEADER_FILE
                      
#define uchar 	unsigned char
#define uint 	unsigned short
#define ulong 	unsigned long

#define FALSE 	0
#define TRUE 	1
#define	NULL	0

/*------------------------------------------------------------------------
							可手动分配用内存启始地址
-------------------------------------------------------------------------*/
extern 		char 	Image$$ZI$$Limit[];
extern		char	Image$$ZI$$Base[];

/*------------------------------------------------------------------------
							应用程序堆栈
-------------------------------------------------------------------------*/
#define 	APP_STACK_SIZE	256*10	//应用程序堆栈最大容量(修改cstartup_XXX.s对应项)

/*-----------------------------------------------------------------------
							限制常量定义
------------------------------------------------------------------------*/
#define TicLine		50		//收据头项数(包括厨打头尾信息)(要求为5的倍数,否则要修改串口通讯)

#define	TicMax		32		//收据头宽度
#define	DefHZLLong	72		//自定义汉字点阵数

#define	DispMax		41		//显示宽度

#define	SysProgHMax	9		//高级系统参数项数
#define	SysProgMax	30		//系统参数项数	(最多不要超过50,否则要修改串口通讯)

#define	PluCodeLen	7		//PLU编码长度
#define	PluCodeLenB 13		//PLU编码位数
#define PluNameLen	19		//PLU名称长度

#define	DeptNameLen 10		//部类名称长度
#define	DeptMax		100		//部类数		(要求为10的倍数,否则要修改串口通讯)

#define GroupNameLen	10	//套餐名称长度
#define	GroupMax	50		//最大套餐数	(要求为10的倍数,否则要修改串口通讯)
#define	GroupPluMax	10		//套餐项PLU个数

#define	ReceNameLen	10		//收款员名称长度
#define	ReceMax		100		//收款员/营业员数(要求小于254个,否则要修改串口通讯)
#define	ReceMin		6

#define	TabNameLen	10		//台名称
#define	TabMax		1000	//最大开台数
#define	PauseMax	1000	//最大挂单项数

#define	DPluMax		99		//直接PLU最大数	(要求为11的倍数,否则要修改串口通讯)

//#define	CardMax		5000	//最大卡流水记录数

#define	PayModeMax	7		//付款方式个数	(要求为7的倍数,否则要修改串口通讯)
#define	PayModeNameLen	12	//付款方式名称长度

#define	DefHZMax	20		//自定义汉字个数 (要求为2的倍数,否则要修改串口通讯)

#define	OtherNameMax	10	//其他名称编程组数
#define OtherNameLen	10	//其他名称长度

#define	DepictMax	50		//描述/厨打分组信息组数	(要求为10的倍数,否则要修改串口通讯)
#define	DepictNameLen	10	//描述/厨打分组信息名称长度

#define	SellMax		50		//同一单最大销售单数 SellMax = TabBlockSellMax * TabBlockOneMax;
#define	TabBlockSellMax	10	//开台块销售记录容量
#define	TabBlockOneMax	5	//开台记录最多占用块数

#define	IOBufMax	72		//输入/输出缓冲区最大长度

#define	DKeyMax		90		//自定义键盘个数

#define	TigerMax	26		//电子秤输入字符个数

#define	CardNoMax	5		//卡号最大长度
#define	CardNoMaxB	10		//卡号最大字符个数

#define	ClientMax	10		//最大客户端连接数

#define	FileTempBufMin	512*2	//文件系统存储最少缓冲

#define File_ICCard	0		//IC卡消费流水帐文件暂存缓冲区大小
							//(文件系统存储最少缓冲的倍数)
#define File_Ediary	0		//电子日记帐文件暂存缓冲区大小
							//(文件系统存储最少缓冲的倍数)

#define	Kit1InFlag	0x1		//厨打1
#define	Kit2InFlag 	0x2		//厨打1
#define	Kit3InFlag	0x4		//厨打1
#define	Kit4InFlag	0x8		//厨打1

#define	CMOSMenuMax	5		//高级菜单项数
#define	SysMenuMax	21		//系统编程主菜单项数
#define	X_RepMenuMax	12	//X 报表主菜单项数
#define	Z_RepMenuMax	17	//Z 报表主菜单项数

/*------------------------------------------------------------------------
							常用键定义
-------------------------------------------------------------------------*/
#define 	Key0 		0
#define 	Key1 		1
#define 	Key2		2
#define		Key3		3
#define		Key4		4
#define		Key5		5
#define		Key6		6
#define		Key7		7
#define		Key8		8
#define		Key9		9
#define		Key00		0x1e	/*双零*/
#define		KeyDot		0x2e	/*小数点*/
#define		KeyFeed 	0x10	/*走纸*/
#define		KeyPoff		0x11	/*打印ON/OFF*/
#define		KeyDraw		0x12	/*开钱箱*/
#define		KeyRece		0x13	/*收款员*/
#define		KeyWaiter	0x14	//营业员
#define		KeyTab		0x15	//台号
#define		KeyChTab	0x16	/*转台*/
#define		KeyHangUp	0x17	//数字锁定,挂单
#define		KeyCard		0x18	/*卡键(各种卡)*/
#define		KeyBack		0x19	//退格
#define		KeyBkGds	0x19	//退货
#define		KeyPgUp		0x2b	//向前翻页
#define		KeyServ		0x2b	/*服务费*/
#define		KeyPgDn		0x2d	//向后翻页
#define		KeyAzc		0x2d	/*折价*/
#define		KeyPlu		0xa		/*PLU*/
#define		KeyXTM		0xb		/*乘/时*/
#define		KeyShift	0xc		/*SHIFT*/
#define		KeyInPlu	0xd		/*输入PLU*/
#define		KeyPrice	0xe		//定价
#define		KeyName		0xf		//名称
#define		KeyPrt		0x1a	//编程打印
#define		KeySubtotal	0x1b	/*小计*/
#define		KeyClr		0x1c	/*清除*/
#define		KeyCancel	0x1d	/*取消*/
#define		KeyCash		0x1f	/*现金*/
#define		KeyRight	0x3e	//光标向右
#define		KeyLeft		0x3c	//光标向左
#define		KeyA		0x61
#define		KeyB		0x62
#define		KeyC		0x63
#define		KeyD		0x64
#define		KeyE		0x65
#define		KeyF		0x66
#define		KeyBlack	0x20	//空格

#define		KeyBB		0xff	/*条码*/

#define		KeyForbid	0x40	//禁止键
#define		KeyDept		0x41	//部类
#define		KeyDPlu		0x42	//直接PLU
#define		KeyClrZero	0x49	//抹0
#define		KeyPay		0x4a	//付款方式
#define		KeyPayBefo	0x4d	//预付
#define		KeyCTime	0x4e	//计时
#define		Key_Num		0x5c	//数字
#define		KeyGroup	0x5d	//套餐
#define		KeyMoneyIn  0x61	//现金入帐
#define		KeyMoneyOut	0x62	//现金出帐
#define		KeyChargeNo 0x63	//参考号
#define		KeyFix		0x64	//改错
#define		KeyTaste	0x65	//口味
#define		KeyInCash	0x66	//输入现金
#define		KeyDepict	0x67	//描述

#define		KeyAsc		0x80
#define		KeyF1		0x81
#define		KeyF2		0x82
#define		KeyF3		0x83
#define		KeyF4		0x84
#define		KeyF5		0x85
#define		KeyF6		0x86
#define		KeyF7		0x87
#define		KeyF8		0x88
#define		KeyF9		0x89
#define		KeyF10		0x8a
#define		KeyF11		0x8b
#define		KeyF12		0x8c

//键扫描码定义
#define		KeyCashScan 0x26
#define		KeyDotScan	0x25
#define		KeyBBScan	0xbb

#define		AllCode		694303

#endif

⌨️ 快捷键说明

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