📄 ftype.h
字号:
#ifdef PC_COMM /* Support the PC communication function */
void Communication(void);
void Comm_AutoChkLinkCmd(byte port, byte uartData);
void Comm_SetStatus(byte status);
void Comm_ChkTimeOut(void);
#endif /* End PC_COMM */
/*************************************************************************
Some macro define functions
*************************************************************************/
#define _DrawOn() DrawOpen()
#define GetSecond() SOFT_SECOND
#define GetMinute() SOFT_MINUTE
#define GetHour() SOFT_HOUR
#define GetDay() SOFT_DAY
#define GetMonth() SOFT_MONTH
#define GetYear() SOFT_YEAR
#define KBPress() (Ktail!=Khead)
#define KBCheck() KeyBuffer[Ktail]
void Test_PrnKrn(byte font);
/*----------------------------------------------------------------------*
Flash:
*----------------------------------------------------------------------*/
void Fls_Inital(void);
byte Fls_SectorErase(byte idx);
byte Fls_WriteByte(byte *dst, byte value);
BOOL Fls_WriteStr(BYTE chipNo, int *dst, int *src, word len);
byte Fls_ReadByte(dword addr);
BOOL Fls_ReadStr(BYTE chipNo, int *src, int *readData,int len);
byte xtr_Fls_WriteByte(byte *dst, byte value);
byte xtr_Fls_WriteStr(byte *dst, byte *src, word len);
byte Fls_Test(byte flag);
/*----------------------------------------------------------------------*
Elec Jrnl:
*----------------------------------------------------------------------*/
#ifdef ELEC_JRNL /* Support the electronic journal function */
void Update_Elec_Jrnl(void);
void Clr_Elec_Jrnl(byte flag1);
void Do_Elec_Jrnl_Rpt(byte flag1, byte flag2);
void Do_Elec_Jrnl_Rep(byte flag1, byte flag2, long start, long end, word length);
void Prn_Send_EJ(void);
void Send_EJ_Up(byte *src, byte end_flag);
void Clr_EJ_Para(void);
void EJ_Tax_Process(void);
BOOL Chk_EJ_Up(void);
byte Get_EJ_Sta(void);
BOOL Atv_Log_Judge(void);
byte *Get_Next_Head(byte *elec_jrnl_ptr, byte length);
byte *Get_Next_Free_Head(byte *elec_jrnl_ptr, byte length);
byte *Get_Next_Record(byte *elec_jrnl_ptr);
byte *Get_Record(byte *elec_jrnl_ptr, word idx);
void Log_Recovery(void);
void Atv_Log_Write(void);
void Init_Sale_Jrnl(void);
void Init_Dc_Jrnl(void);
void Init_Rm_Jrnl(void);
void Init_Jrnl_Para(byte flag);
ELECJRNLHEADDEF *get_jrnl_head(ELECJRNLHEADDEF *elec_jrnl_head);
void fls_store_sale_item(byte *tsbf, byte inc);
void fls_store_dc_item(byte *tsbf, byte inc);
void fls_store_rm_item(byte *tsbf, byte inc);
void prn_Elec_Jrnl(byte flag1, byte *elec_head_ptr);
#endif /* End ELEC_JRNL */
/*----------------------------------------------------------------------*
The new added:
*----------------------------------------------------------------------*/
long Sale_Mul(long l1, byte dots1, long l2, byte dots2, byte round, byte dots3);
byte Sale_Mul2(DoubleLong *ll, long l2, byte dots2, byte round, byte dots3);
long Sale_Div(long l1, byte dots1, long l2, byte dots2, byte round, byte dots3);
void prn_mul_info(long quantity, long price);
byte Cal_Len2(long num, char dots);
byte get_tax_comb(void);
byte desc_cpy(char *dst, const char *src, byte res_len);
byte Get_Desc_Len_Ex(byte *disp_str, byte disp_len, byte mode);
byte Get_Spec_Len(char *src);
/*----------------------------------------------------------------------*
The convert functions:
*----------------------------------------------------------------------*/
byte LongAndDot2Str(long num, signed char dots, byte *obj_str, byte store_dot_flag, byte adj_flag, byte store_aster_flag, byte xch_comma_dot_flag);
void HextoAsc(CHR *ascstr,CHR num);
void Byte_Rev(byte *opr, byte len);
void DectoAsc(CHR *ascstr,CHR num);
//void Push_Pop_Port_Status(byte flag, byte mode, byte port);
void Store_CBCD_Cell(CHR data, CHR *bcdstr, CHR posi);
void xtr_strcpy(char *s1, char *s2);
CHR DectoBCD(CHR num);
void BCDtoAsc( CHR *ascstr,CHR *bcdstr,CHR len );
CHR BCDtoDec(CHR Num);
void LWordtoBCD( CHR *bcdstr, DWORD num, CHR len );
DWORD BCDtoLWord( CHR *bcdstr,CHR len );
void BCD_Inc(CHR *bcdstr, CHR len);
void BCD_Dec(CHR *bcdstr, CHR len);
int BCD_Cmp(const CHR *src1, const CHR *src2, CHR len);
int BCD_ICmp(const CHR *src1, const CHR *src2, CHR len);
void BCD_Add(CHR *bcddst,CHR *bcdsrc,CHR len);
void BCD_Sub(CHR *bcddst,CHR *bcdsrc,CHR len);
void BCD_Neg(CHR *dst, CHR len);
void LWordtoAsc( CHR *asc_str, DWORD num, CHR len);
void LHextoAsc(CHR *ascstr,DWORD hexnum,CHR len );
BOOL BCD_Zero(CHR *bcdstr, CHR len);
#define Bin2BCD(x) DectoBCD(x)
#define BintoBCD(x) DectoBCD(x) // The same procedure and result
#define HextoBCD(x) DectoBCD(x) // The same procedure and result
#define Bcd2dec(x) BCDtoDec(x)
#define BcdtoBin(x) BCDtoDec(x)
#define BCDtoBin(x) BCDtoDec(x) // The same procedure and result
#define BCDtoHex(x) BCDtoDec(x) // The same procedure and result
#define Long2Bcd(x, y, z) LWordtoBCD(x, y, z)
#define Bcd2Long(x, y) BCDtoLWord(x, y)
#define BcdtoAsc(x, y, z) BCDtoAsc(x, y, z)
#define Bcd2toAsc(x, y, z) BCDtoAsc(x, y, z)
#define Bcdinc(x, y) BCD_Inc(x, y)
#define Bcddec(x, y) BCD_Dec(x, y)
#define Bcdadd(x, y, z) BCD_Add(x, y, z)
#define Bin2toAsc(x, y, z) LWordtoAsc(x, y, (z*2))
#define LongtoAsc(x, y, z) LWordtoAsc(x, y, z)
#define BcdtoprnAsc(x, y, z) LHextoAsc(x, *((DWORD *)y), (z*2))
#define Bin2toBcd(x, y, z) LWordtoBCD(x, y, (z*2))
void DectoAsc(CHR *ascstr,CHR num);
void HextoAsc(CHR *ascstr,CHR num);
void Store_BCD_Cell(CHR data, CHR *bcdstr, CHR posi);
///////////////////////////////////////////////////////////////////////////////
// Add by ChenHuahai after Oct 11, 2004
///////////////////////////////////////////////////////////////////////////////
byte Fm_ReadByte(dword readAddr);
byte Fm_WriteByte(dword destAddr, byte srcByte);
byte Fm_WriteStr(dword ptr, const void *str, int len);
void Fm_ReadStr(void *str, dword addr, int len);
byte Fm_Exist(void);
void Fm_SetPwr(byte open);
void Fm_SetVpp(byte open);
void Fm_SetVdd(byte open);
void Fm_Init(void);
void FirmCodeProgram(void);
bool PresetFmHeadTail(void);
bool ReadFirmCode(byte* firmCode);
bool Fm_CheckReadAndWrite(void);
bool Fm_CheckFree(void);
void Uart_Debug(void);
void Rtc_Debug(void);
void KB_Debug(void);
void Lcm_Debug(void);
void FM_Debug(void);
void Flash_Debug(void);
void Wind_Debug(void);
void Draw_Debug(void);
void Sram_Debug(void);
void Prn_Debug(void);
void Buzzer_Debug(void);
void Vfd_Debug(void);
void Dbg_Set(dword cmd);
void Dbg_Power(void);
// inter test function
bool Rtc_TestWeekAndTime(void);
/*----------------------------------------------------------------------*
2004-11-11 10:02 new add:
*----------------------------------------------------------------------*/
void SetAsterPrn(void);
void ClrAsterPrn(void);
BOOL ChkAsterPrn(void);
#define SetNoAsterPrn() ClrAsterPrn()
void SetSplitPrn(void);
void ClrSplitPrn(void);
BOOL ChkSplitPrn(void);
#define SetNoSplitPrn() ClrSplitPrn()
void SetDftPrn(void);
void Get_Sto_Flag(byte *sto_dot, byte *adj, byte *sto_aster);
/*----------------------------------------------------------------------*
TS key board
*----------------------------------------------------------------------*/
void Rst_Ts_Lcd(void);
word ts_get_logi(word key);
void GUI_TOUCH_SetDefaultCalibration(void);
int TOUCH_X_MeasureY(void);
void TOUCH_X_ActivateX(void);
void TOUCH_X_ActivateY(void);
void GUI_TOUCH_Exec(void);
int TOUCH_X_MeasureX(void);
void Init_TFT(void);
void Init_Ts(void);
word TS_Key_Get(word key_code);
byte TS_Key_Size_Get(word *logic_code, byte *Size_Tabl);
byte TS_Btn_ID_Get(word key_code);
void Ts_Fx_Data_Input(char data);
/*----------------------------------------------------------------------*
TFt Lcd layout
*----------------------------------------------------------------------*/
void TFT_Clear(char color); //colorb: 背景色
void Lcd_Layout_Main(void);
void Lcd_Layout_Draw_Key(void);
void Lcd_Send_Text_Buff_Str(byte text_id, byte posi, char *src, byte align);
void Lcd_Send_Text_Buff_Mem(byte text_id, byte posi, char *src, byte len, byte align);
void Lcd_Send_Text_Buff_Desc(byte text_id, byte posi, char *desc, byte mode, byte align);
void LongLcdFmt_Text_Buff(byte text_id, byte posi, long data, byte dots, byte align);
void LongLcdFmt_Text_Buff_Q(byte text_id, byte posi, long data, byte dots, byte align);
void Lcd_Disp_Text_Buff(byte text_id);
void Lcd_Disp_Str_Btn(byte Btn_ID, char *str);
void Rst_Lcd_Text(void);
void Rst_Pop_Text(void);
void Rst_Tl_Titl(void);
void Rst_Tl_Stat(void);
void Rst_Tl_Input(void);
void Rst_Tl_Sub(void);
void Rst_Ts_Key(void);
void Lcd_Init_Sys_ID(byte sys_id);
void Lcd_Tl_Input_Disp(byte input_stat, long data);
void Lcd_Disp_Subttl(void);
void Lcd_Err_Type(word type, char *err_str);
void Lcd_Init_Pop_Text(byte pop_type);
void Lcd_Res_Pop_Text(void);
BOOL Lcd_Chk_Sure_Key(void);
void Lcd_Err_Type(word type, char *str);
void Lcd_Roll(word key);
void Do_Hard_Plu(void);
void Do_Shift_Dept(void);
void Lcd_Set_Text_Refresh(void);
void Lcd_Cls_Text_Refresh(void);
void Lcd_Opn_Text_Refresh(void);
void Lcd_Init_Prog(void);
void Lcd_Set_Mode(byte mode);
void Lcd_Disp_Text(byte *str);
void Lcd_Disp_Cash_Info(long subttl, long cash, long change);
void Pos_Prn_Logo(byte logo_no);
BOOL Chk_Clr_Rpt_Sure(void);
void Lcd_DownLoad_Logo(byte mode, DWORD Addr);
void isp_logo_Down(void);
void Lcd_Screen_Protest_Logo(void);
BOOL CndtDelay2(int ms);
BOOL Chk_Isp_Sure(void);
void Lcd_Disp_Successful_Info(byte *str1, byte *str2);
void Lcd_Init_Color(void);
void Lcd_Set_Color(byte color);
void Stk_Chk(void);
byte Chk_Word(char src_char);
//void Uart_Wait_Stop(void);
void Lcd_Shift_Exchange(word key);
void Rst_PLU_Dft_Dept(word j);
byte Get_Key_Color(word CMD, const word *Key_Tabl, const byte *Key_color_Tabl, word Tabl_Len);
byte Get_Key_Desc(char *dst,byte Max_Len, word CMD, const word *Key_Tabl, const char **Key_Desc_Tabl, word Tabl_Len);
void Lcd_Draw_Button_REV(word logic_code, byte rev);
byte Btn_Desc_Input(BUTTON_DEF *Btn);
byte Get_All_Key_Desc(char *dst,byte Max_Len, word CMD);
byte Get_All_Key_Color(word CMD, byte flag);
void Lcd_Draw_Text_Btn(BYTE Btn_ID);
void Init_Func_Btn(void);
byte LnumToTextBuff(char *str, long data, byte dots);
void Lcd_Clr_Text_Btn(byte Btn_ID, byte Rev);
void Lcd_Send_Text_Buff_Str_Sub(byte text_ID, byte posi1,char *str,byte posi2, long num, byte dots,byte Align);
void Pop_Btn_Init(void);
void Lcd_Text_Line_Disp(byte line, byte rev);
//add By STS. 2006-08-05 12:10
void Pro_Disp_TL_Info(byte * str_buf);
void Insert_Full_Text_List(const char Str_List[][], byte Max_Line, byte FstLine);
void Get_Full_Text_List(const char *Str_List[], byte Max_Line, byte line);
void Lcd_Reflush_List(byte mode);
void Ts_MinMax_Define(void);
void Tax_Init(void);
void Envir_Mode_Clear(void);
void Do_DTABLE(byte table_no);
void Do_Page_Table(void);
void Lcd_Draw_Btn(word logic_code, byte btn_id);
void Do_Page_Dept(void);
void Do_Page_PLU(void);
void Do_Page_CM(void);
void Do_Virtual_Key(void);
void Do_CM(byte cm_idx);
void Do_Table_Detail(void);
void Date_Fmt_Sto(byte year, byte month, byte day, byte *dst);
void Do_Dept_Ex(byte ch);
void Lcd_ClrText(void);
void Do_Waiter_Select(void);
void Do_Page_Waiter(void);
void Do_Table_Split(void);
void Table_Sale_Init(void);
#include "serial.h"
#include "kprp.h"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -