📄 ecrsys.h
字号:
#define NUL_VLU 0 /* Null value */
#define VIRTUAL_KEY_IDX_NULL 0xffff /* The virtual key, index number is null */
#define VIRTUAL_KEY_IDX_NULL2 0xff
#define NULL_KEY_COLOR GRAY
#define TMDT_STEP_NUM 2 /* The step of time and date programing. */
#define PER_DOTS 3 /* The percentage dots */
#if SW_VER == SW_NE2
#define VAT_TAX_DOTS 0 /* The VAT dots or the tax dots */
#else
#define VAT_TAX_DOTS 3 /* The VAT dots or the tax dots */
#endif
#define BAUD_RATE_NO 4 /* The max baud rate set step */
#define MSG_HEAD_LINES 5 /* The welcome message lines */
#define MSG_BTM_LINES 5 /* The bottom message lines */
#define PRICENUM 7 /* The digit of price */
#define BAR_BUFF_LEN 7 /* The max bar buffer length */
#define NUMLIMIT 9 /* The max input input number */
//#define LCDNUM 10 /* LCD max number */
#define VFDLEN 10 /* The LCD display length */
#define DEPT_GROUP_NUM 10 /* The group number of department. */
#define MONTH 12 /* The number of months of a year */
#define PLU_GROUP_NUM 50 /* The group number of PLU. */
#ifdef VER_RSNT
#define MAX_KP_SFX_NUM 200 /* The max number of suffix comment send to the kitchen printer */
#define MAX_DEPT_CM_NO 40
#endif
#define PLU_GROUP_LEN 200 /* The maximum length of each PLU group. */
#define DFT_LCD_BL_TIME 300000 /* The default LCD backlight time is 5 Mins */
#ifdef ELEC_JRNL
#define EJ_NORMAL 0 /* Normal */
#define EJ_SALE 1 /* Sale journal */
#define EJ_DC 2 /* Discount journal */
#define EJ_RM 3 /* Return Merchandise journal */
#define EJ_QUIT_UP 8 /* Quit the upload function */
#define EJ_EXIT_COMM 9 /* Exit the communication */
#define EJ_PRN_ALL 1 /* Print the all journal */
#define EJ_PRN_DATE 2 /* Print the journal by date */
#define EJ_PRN_CLERK 3 /* Print the journal by clerk number */
#define EJ_PRN_RCPT 4 /* Print the journal by receipt number */
#endif
#define RPT_FULL_DAILY 1 /* The daily sales report */
#define RPT_FULL_PTD 2 /* The PTD sales report */
#define RPT_PLU_DAILY 3 /* The daily PLU sales report */
#define RPT_PLU_PTD 4 /* The PTD PLU sales report */
#define RPT_CLERK_DAILY 5 /* The daily clerk sales report */
#define RPT_CLERK_PTD 6 /* The PTD clerk sales report */
#define RPT_HOURLY 7 /* The hourly sales report */
#define RPT_NRGT 8 /* The NRGT */
#define RPT_TABLE 9 /* The Table report */
#define RPT_WAITER 10 /* The waiter report */
#define RPT_MENU_DAILY 11 /* The PLU container daily report */
#define RPT_MENU_PTD 12 /* The PLU container PTD report */
#define MAX_08_LENGTH 8
#define MAX_12_LENGTH 12
#define MAX_16_LENGTH 16
#define MAX_20_LENGTH 20
#define MAX_32_LENGTH 32
#define MAX_24_LENGTH 24
#define MAX_PROG_STEP 19
#define MAX_REGI_DESC_LEN 64 /* Max register descriptor length */
#define PRN_NONE 0 /* None KP or RP */
#define PRN_KP 1 /* Kitchen printer */
#define PRN_RP 2 /* Receipt printer */
#define KP_NONE 0 /* Kitchen printer/Receipt printer type, None */
#define KP_TM_88_III 1 /* TM-88III/POS01, The command set of ESC/POS */
#define KP_TM_U210 2 /* TM-U210, EPSON */
#define KP_IDP3110 3 /* IDP3110, Citizen */
#define TAX_MODE 0
#define VAT_MODE 1
#define GST_MODE 2
#define XON 0x11
#define XOFF 0x13
#define DTR_ON 0x00
#define DTR_OFF 0x01
#define POS_XON 0x00
#define POS_XOFF 0xff
#define HW_SHAKE 0x02
#define SW_SHAKE 0x01
#define MAX_DISP_LEN MAX_CHAR16
#define MAX_DISP_LINE (LCMLINE/2)
#define FLS_LOGO_FONT_BASE (FLS_BASE_ADDR + 0x80000)
#define FLS_LOGO_BASE FLS_LOGO_FONT_BASE
#define FLS_LOGO_SIZE (7200 * 10UL)
#define FLS_KOREA_FONT1_BASE (FLS_LOGO_BASE + FLS_LOGO_SIZE)
#define KOREA_FONT24_SIZE (2350 * 72UL)
#define FLS_KOREA_FONT2_BASE (FLS_KOREA_FONT1_BASE + KOREA_FONT24_SIZE)
//#define FLS_KOREA_FONT16_BASE (FLS_KOREA_FONT2_BASE + KOREA_FONT24_SIZE)
#define FLS_KOREA_FONT16_BASE (FLS_BASE_ADDR + 0x32000)
#define KOREA_FONT16_SIZE (2350 * 32UL)
#define FLS_LOGO_FONT_SIZE (FLS_LOGO_SIZE + KOREA_FONT24_SIZE + KOREA_FONT24_SIZE + KOREA_FONT16_SIZE)
#define MAX_TAXTABLE_CNT 2
#define MAX_PER_NUM 2 /* 0: is [+ %]; 1: is [-%]*/
#define MAX_DOTS_NUM 3 /* The maximum of decimal point number */
#define MAX_TAX_NUM 4 /* The max number of tax. */
#define MAX_SECRET_LEN 4 /* The max secret legth of clerk. */
#define MAX_PCASH_NUM 4 /* The max PCASH number */
#define MAX_CHECK_NUM 5 /* The max check number */
#define MAX_CHARGE_NUM 5 /* The max charge number */
#define MAX_MISC_NUM 5 /* The Max MISC nmber*/
#define MAX_LOGO_LINE 5
#define VIRTUAL_POSI_TAX3 6 /* The virtual position */
#define MAX_VAT_NUM 4// 6 /* The max number of VAT */
#if KB == KB_59N24
#define MAX_KEY_SCAN_CNTR 13
#elif KB == KB_38
#define MAX_KEY_SCAN_CNTR 6
#else //KB == KB_TS
#define MAX_KEY_SCAN_CNTR 1 //只有一根控制线
#endif
#define MAX_HALO_LEN 8 /* The max length of HALO */
#define MAX_GROUP_NUM 9 /* The max group number */
#define MAX_LCD_NUM 10
enum LCM_LINE{
LCM_LINE_NUL = 0,
LCM_LINE_ST = 1,
LCM_LINE_1 = LCM_LINE_ST,
LCM_LINE_2,
LCM_LINE_3,
LCM_LINE_4,
LCM_LINE_5,
LCM_LINE_6,
LCM_LINE_7,
LCM_LINE_8,
LCM_LINE_END = LCM_LINE_8,
};
#ifdef PC_COMM /* Support the PC communication function */
#define MAX_LOGO_NUM 11
#else /* Else PC_COMM */
#define MAX_LOGO_NUM 10
#endif /* End PC_COMM */
#define MAX_PROABLE_SYS_NUM 20 //11 /* The max programable system parameter number */
#define MAX_INPUT_LEN 13 /* The maximum of input len */
#define MAX_DESC_LEN 12
#define MAX_DESC_LEN_EX 12
#define MAX_LENGTH_15 15 /* The max length */
#define MAX_PRN_WIDTH 19 /* printer columns (width) */
#define MAX_SHIFT_INC 45 /* The maximum shift increment of department */
#define MAX_DEPT_KEY_CNTR 6// 45
#define MAX_DPLU_KEY_CNTR 43// 45
#ifdef OLD
#define MAX_PRN_LEN 32
#else
#define MAX_PRN_LEN 24
#endif
#define MAX_BREAK_CNT 36
#define MAX_TABLE_BUFF_NUM 100 /* The maximum of table buffer number */
#define MAX_SPLIT_TABLE 6
#define MAX_TNSBF_LEN 200 /* The maximum transaction buffer length */
#define MAX_TABLE_LOGI_NO 999999 /* The maximum of table's logical number */
#define TABLE_KEY_INC 28 /* The increment of the table key */
#define DEPT_KEY_INC 10 /* The increment of department key */
#define PLU_KEY_INC 16 /* The increment of PLU key */
#define CM_KEY_INC 10 /* The incremetn of Cooking Message */
#define WAITER_KEY_INC (TABLE_KEY_INC-1) /* 多了一个返回台的按键 */
#define TABLE_KEY_START_POSI 0 /* The first table key start position, used for the table page left and page right */
#define DEPT_KEY_START_POSI 0 /* The first department key start position, used for the table page left and page right */
#define PLU_KEY_START_POSI 12 /* The first PLU key start position, used for the table page left and page right */
#define CM_KEY_START_POSI 36 /* The first cooking message key start position, used for the table page left and page right */
#define WAITER_KEY_START_POSI TABLE_KEY_START_POSI
#define WAITER_FILL_COLOR LIGHTCYAN
#define WAITER_FONT_COLOR PURPLE
#ifdef REST_PLU_FUNC
#define MAX_PLUTAB_NO 100
#define MAX_MENU_KEY_CNTR 10
#define MAX_MEAL_ITEM 99
//#define MAX_DPLU_NO (MAX_EXTEND_KEY)
#define MAX_PLUTAB_STEP 2
#endif
#define MAX_DPLU_NO 240
#define DFT_CM_CNT 17 /* The default cooking message for the debug version */
#ifdef FCE_FUNC /* Support the FCE function */
#define MAX_FCE_CNT 4 /* FCE number */
#define MAX_FCE_DOT 5 /* The max FCE rate decimal dots */
#define MAX_FCE_LEN 9 /* 最长FCE的长度, 等于最大整数位与小数位的和 */
// #define FCE_INT_NUM 4 /* The FCE rate integer digit number */
// #define FCE_DOT_NUM 5 /* The FCE rate decimal dots digit number */
#define FCE_KEY_NUM_INC (MAX_FCE_CNT+1) /* The one is "FCE" key */
#define MAX_FCE_XCH 9999999 /* The max exchange foreign currency */
#else /* Else FCE_FUNC */
#define FCE_KEY_NUM_INC 0 /* The increase key number */
#endif /* End FCE_FUNC */
#define MAX_EXTEND_KEY 128 /* PLU key number */
#define FF_KEY_NUM 255
#define MAX_KEY_WD1 0
#define MAX_KEY_CNT (MAX_KEY_WD1 + MAX_EXTEND_KEY)
//#define MAX_MODI_KEY 76
#define MAX_MODI_KEY 150
#define MAX_DIGIT_NUM 10
#define MAX_FIXED_KEY 24
#define MAX_RPT_KEY 15
#define MAX_DEPT_KEY 200
#define MAX_DPLU_KEY 240
#define MAX_TENKEY 10
/******************************************************************
The limits define:
******************************************************************/
#define MAX_REL_DEPT_CNT 200//100 /* The real operateable department number */
#define MAX_DFT_PLU_CNT 155
#define MAX_DFT_DEPT_CNT 15
#ifndef WD1VER /* The WD1-E version */
#define MAX_DEPT_CNT 200//24//100
#define MAX_PLU_CNT 3000
#define MAX_PLU_USED_TBL_CNT 375 // (MAX_PLU_CNT>>8)
#define MAX_CLERK_CNT 40
// #define MAX_CLERK_CNT 15
#ifdef VER_RSNT /* Support the restaurant function */
#define MAX_TABLE_CNT 50//200
#define MAX_WAITER_CNT 50
#endif /* End VER_RSNT */
#ifdef ELEC_JRNL /* Support the electronic journal function */
#define MAX_SALE_JRNL_CNT 10000 /* Max sale journals counter */
#define MAX_DC_JRNL_CNT 1000 /* Max discount journals counter */
#define MAX_RM_JRNL_CNT 1000 /* Max return merchandise journals counter */
#endif /* End ELEC_JRNL */
/* The default size of department, PLU... */
#define DFT_DEPT_CNT 200// 100
#define DFT_CLERK_CNT 40
#ifdef VER_RSNT /* Support the restautant function */
// #define DFT_WORK_MODE RETAIL /* The default work mode is the retail mode */
#define DFT_WORK_MODE RSNT /* The default work mode is the Restaurant mode */
//#define DFT_TABLE_CNT 50
#define DFT_TABLE_CNT 40
#define DFT_WAITER_CNT 50
#endif /* End VER_RSNT */
#ifdef ELEC_JRNL /* Support the electronic journal function */
// #define DFT_SALE_JRNL_CNT 7000 /* Default sale journals counter */
// #define DFT_DC_JRNL_CNT 500 /* Default discount journals counter */
// #define DFT_RM_JRNL_CNT 100 /* Defaulet return merchandse journals counter */
/* The journal has putted in the flash, so the default size is different */
#define DFT_SALE_JRNL_CNT MAX_SALE_JRNL_CNT /* Default sale journals counter */
#define DFT_DC_JRNL_CNT MAX_DC_JRNL_CNT /* Default discount journals counter */
#define DFT_RM_JRNL_CNT MAX_RM_JRNL_CNT /* Defaulet return merchandse journals counter */
#endif /* End ELEC_JRNL */
#else /* Else WD1VER */
#define Max_Dept_No 24
#define Max_Plu_No 999
#define Max_Clerk_No 40
#endif /* End WD1VER */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
The Sweden version electronic journal define
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#define FLS_BASE_ADDR 0x200000 // Flash 29F080 base address
#define FLS_SCT01_ADDR FLS_BASE_ADDR /* The flash 1st sector address */
#define FLS_SCT02_ADDR (FLS_BASE_ADDR+0x10000) /* The flash 2nd sector address */
#define FLS_SCT03_ADDR (FLS_BASE_ADDR+0x20000) /* The flash 3rd sector address */
#define FLS_SCT04_ADDR (FLS_BASE_ADDR+0x30000) /* The flash 4th sector address */
#define FLS_SCT05_ADDR (FLS_BASE_ADDR+0x40000) /* The flash 5th sector address */
#define FLS_SCT06_ADDR (FLS_BASE_ADDR+0x50000) /* The flash 6th sector address */
#define FLS_SCT07_ADDR (FLS_BASE_ADDR+0x60000) /* The flash 7th sector address */
#define FLS_SCT08_ADDR (FLS_BASE_ADDR+0x70000) /* The flash 8th sector address */
#define EACH_SCT_SIZE 0x10000 /* Each sector's size, 64K */
#define JRNL_ATV_ADDR FLS_SCT01_ADDR /* The journal active or not area start address */
#define SALE_JRNL_START FLS_SCT02_ADDR /* The sale journal start address */
#define DC_JRNL_START FLS_SCT05_ADDR /* The discount journal start address */
#define RM_JRNL_START FLS_SCT07_ADDR /* The R.M. journal start address */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -