📄 ftype.h
字号:
#ifdef VER_RSNT /* Support the restaurant function */
void Do_Active_Rpt(void);
byte Do_Table_Rpt(void);
byte Rsnt_ChkSale(void);
void prn_Sngl_Table_Rep(byte Idx);
void prn_Sngl_Active_Rep(byte Idx);
byte Do_Waiter_Rpt(void);
void Do_Waiter_Rep(void);
void prn_Sngl_Waiter_Rep(byte Idx);
#endif /* End VER_RSNT */
void Do_ClrRpt(long num);
void Do_ClrProg(long num);
void Set_Rpt_Flag(byte idx);
void Clr_Rpt_Flag(byte idx);
BOOL Chk_Rpt_Flag(byte idx);
void Clr_All_Rpt_Flag(void);
BOOL Chk_Rpt_Clr(void);
void Clr_All_Rpt(void);
/*************************************************************************
The hardware interrelatived function
*************************************************************************/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Keyboard
* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void InitialKey(void);
void key_rngset(word work);
word FF_Key_Get(word key_code );
word key_check( void );
word key_logi_get(const word *Key_Tabl, word code, word Tabl_Len);
void Clr_Key_Buff(void);
void key_matrx_init(byte flag);
byte Key_Poll_Chk(void);
byte Key_Buff_Chk(word key_code);
word Rcode(word);
void Make_Virtual_Key(word key_code);
void Modi_Key(word logi_posi, word key_code, byte flag);
word Get_Scan_Lock(void);
byte Wait_Sure(char *disp_str);
byte Phy_Sure(void);
byte GetIn(void);
word GetKey(void);
word GetKey_Ex( void );
byte GetMainMode(void);
byte Chk_KeyPrs_LockChg(byte flag);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
POS key board
* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void PS2_Init(byte port);
byte PS2_ChkKeyIn(word *keyCode);
void PS2_GetFeedCode(void);
void PS2_GetKBScanCode(void); // 调试用.
void PS2_SetPortFunc(byte flag);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
LCD
* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void Init_Lcd(void);
void LCD_Back_Set(void);
void LCD_Back(CHR flag);
void Clr_Dsp_Data(void);
void Close_Disp(void);
void VFDSetPeriod(byte position,byte flag);
void Insert_Period(byte posi);
void Cancel_Period(byte posi);
void Clr_Period(void);
void Insert_Sect(CHR dsp_data,CHR posi);
void Insert_Char(byte,byte);
void Insert_Num(CHR,CHR);
void Insert_Byte(CHR dsp_Byte, CHR posi);
void disp_Char_Str( CHR* str,CHR posi );
void disp_Num_Str(CHR *ptr,CHR posi);
void LCD_Test(void);
void VFDDisplay(char*,char,char);
void RightDisp(long num ,char dots);
void Do_Clear(void);
void Clr_DPSF_Disp(void);
void TransDis(byte ch);
void Disp_Mode(void);
void disp_receipt_prn_mode(void);
void Disp_Spec_Period(void);
void Lcd_ChkTimer(void);
void Lcd_WriteDot(byte x, byte y, byte disp_data);
void Lcd_ClrLine(byte startLine, byte num);
void Lcd_SetDisp(byte open);
void Lcd_SetBL(byte open);
void Lcd_DispCn(const byte *str, byte loct_x, byte loct_y, byte len);
void Lcd_DispRev(const byte *str, byte loct_x, byte loct_y, byte len);
void Lcd_Disp(byte *str, byte col, byte line, byte len, byte attr, byte clr, byte font, byte revers);
///////////////////////
void Lcm_Init(void);
void VfdDispChar(byte pos, byte temp, byte dots);
#define LcdBlOn() (LCD_BL = 1)
#define LcdBlOff() (LCD_BL = 0)
void InitialVfd(void);
extern const char Str_Flush_Head[];
#if 0
#define Insert_Char(dsp_char, posi) Lcm_Disp_Data(dsp_char, posi, LCM_LINE_1, FALSE)
#define Insert_Num(dsp_data, posi) Lcm_Disp_Data(dsp_data, posi, LCM_LINE_1, FALSE)
#define Clr_Dsp_Data() Lcm_Disp_Clr(LCM_LINE_1 ,FALSE) // 这个保留以前的功能,仅清除第二行
void Lcm_Disp_Data(byte dsp_data, byte posi, byte line, byte rev);
void Lcm_Disp_Str(char *str, byte line, byte align, byte rev);
void Lcm_Disp_Clr(byte line ,byte rev);
void Clr_All_Dsp_Data(byte rev);
void Lcm_Plus(void);
void LongLcmFmt(long num, char dots, byte Location, byte Direction, byte line, byte rev);
void Lcm_Adj(char *src_str, long num, byte dots, byte posi, byte line,byte rev);
void Sale_Lcm_Disp(TRANSBUFFDEF tsbf, byte line);
void Lcm_Disp_Mem(char *str, byte len, byte line, byte posi, byte rev);
void Lcm_Disp_Clr_Ex(byte vrt, byte high, byte col, byte len, byte rev);
#define dis_sto_last_disp() sto_last_disp_flag = FALSE
#define en_sto_last_disp() sto_last_disp_flag = TRUE
#define dis_res_last_disp() res_last_disp_flag = FALSE
#define en_res_last_disp() res_last_disp_flag = TRUE
#define chk_res_last_disp() (res_last_disp_flag == TRUE)
void Lcm_Disp_Last_Line(byte line);
#else
#define Lcm_Disp_Data(dsp_data, posi, line, rev)
#define Lcm_Disp_Str(str, line, align, rev)
#define Lcm_Disp_Clr(line, rev) Clr_Dsp_Data()
#define Clr_All_Dsp_Data(rev) Clr_Dsp_Data()
#define Lcm_Plus()
#define LongLcmFmt(num, dots, Location, Direction, line, rev)
#define Lcm_Adj(src_str, num, dots, posi, line, rev)
#define Sale_Lcm_Disp(tsbf, line)
#define Lcm_Disp_Mem(str, len, line, posi, rev)
#define Lcm_Disp_Clr_Ex(vrt, high, col, len, rev)
#define Lcm_Disp_Desc(src, mode, line, align, rev)
#define dis_sto_last_disp()
#define en_sto_last_disp()
#define dis_res_last_disp()
#define en_res_last_disp()
#define chk_res_last_disp() FALSE
#define Lcm_Disp_Last_Line(line)
#endif
#define Lcd_DispDigit(str, loct_y, loct_x, len)
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Printer
* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void Init_Prn(void);
void InitialFeedTimer(void);
void InitialHeatTimer(void);
void InitDMA0( void );
#define PrnVccOn() (PRN_VCC = 0)
#define PrnVccOff() (PRN_VCC = 1)
void CvtDbHeigt(void);
void CvtDbHtWd(void);
void CvtNormal(void);
void CvtDbWidth(void);
void PrnBufCvt(void);
void prn_schedule(void);
void wait_prn_Stop(void);
void Key_Feed(void);
void Line_Feed(byte LineCtr);
void CvtBmp(void);
void LineFeedNoDetectPaper(byte num);
void prn_Chk( void );
//---------- print func ------------------------
// prn_buf.c
void Prn_Str(byte type);
void Print_Ex(byte type);
void Prn_BufClr(void);
void Prn_BufFmtClr(void);
void Prn_InsStr1stSp(const byte *str, byte pos, byte fmt, byte fmt2);
void Prn_InsMem1stSp(const byte *str, byte len, byte pos, byte fmt, byte fmt2);
void Prn_InsMem(const byte *str, byte len, byte pos, byte fmt, byte attr);
void Prn_InsStr(const byte *str, byte pos, byte fmt, byte attr);
#define prn_Str() Prn_Str(0)
#define print() Print_Ex(0)
#define prn_Adj(a, b, c, d) Prn_Adj_Ex(a, b, c, d, DESC_OLD)
#define prn_Adj_Q(a, b, c, d) Prn_Adj_Q_Ex(a, b, c, d, DESC_OLD)
#define clr_Prn_Buf() Prn_BufClr()
word Font_Search_Offset(byte qu, byte wei);
byte Get_Str_Prn_Height(byte *src, byte len);
void Prn_InitDesc(byte *obj, byte maxLen, const byte *str, byte fmt, byte fmt2);
void Prn_InsFmtStr(const byte *src, byte pos, byte len, byte attr);
void DLongPrnFmt(DoubleLong dl, byte Location, byte Direction, byte Adj_Len);
void LongPrnFmt(long num, char dots, byte Location, byte Direction);
byte LongPrnFmt_Plus(byte *dst, long num, char dots, byte Location, byte Direction);
void Qty_Adjust(long num);
void Prn_Adj_Ex(char *src_str, long num, byte dots, byte posi, byte mode);
void Prn_Adj_Q_Ex(char *src_str, long num, byte dots, byte posi, byte mode);
void prn_Line(char);
void prn_Stamp(void);
void prn_Testing(void);
void prn_Testing1(void);
void prn_Testing2(void);
void prn_Power_Dwn_Info(void);
void prn_AllLogo(void);
void prn_Bmp(void);
void prn_Full_Line(char chr);
#ifdef VER_RSNT /* Support the restaurant function */
void prn_KP(void);
void prn_KP_Stamp(void);
byte Judge_Send_KP(void);
void Do_Send_KP(void);
void set_kp_rp_font_fmt(byte fmt);
void do_kp_rp_cut_paper(void);
void set_kp_rp_font_udl(byte fmt);
#endif /* End VER_RSNT */
CHR kp_rp_busy_chk(void);
void prn_RP(void);
byte Judge_Send_RP(void);
void send_end_info(void);
void Prn_preHead(void);
void prn_ori_str(byte Idx, byte len);
byte LongPrnFmt_Ex(long num, char dots, byte Location, byte Direction, byte fmt);
void prn_Data_Store(CHR flag );
void prn_Cash_Info_Ex(char *str, byte slen, long payment, byte dots, byte flag);
void Prn_InsImpStr(const byte *src, byte pos, byte len, byte attr);
void kp_wr_str_uart(byte port, byte *src, byte len);
void SetKPFont(void);
void prn_KP_Info(char *str, byte slen, long payment, byte dots, byte flag);
void Send_Inte_Char(void);
byte cpy_esp_desc(char *dst, byte flag, word idx);
void Plu_Add_Prn(word idx);
void prn_tbl_pre_item(void);
void prn_pre_item_head(void);
void Send_KP_Prn(TRANSBUFFDEF tsbf, byte sign);
void prn_RcptNum(void);
void Prn_Init(void);
void Init_Prn(void);
void Prn_Schedule(void);
//#define prn_Chk() Prn_Chk()
void Prn_WaitFinish(void);
void Prn_WaitIdle(void);
void Prn_SyncMotor(void);
void Prn_SwitchJournal(void);
void Prn_SwitchReceipt(void);
void CloseWindMotor(void);
void OpenWindMotor(void);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
System timer
* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void InitialRtcTimer(void);
void InitialSysTimer(void);
void InitialWatchDog(void);
void Wait(word time);
void Delay(int);
void CndtDelay(int ms);
void enint(void);
void disint(void);
void InitialPwrDwn(void);
void Power_Dwn_Chk(void);
void Rtc_SetWeek(DATE tDate);
void SetTimeFlag(DATE newDate);
void Sys_ChkBatteryLow(void);
void Sys_ChkBatteryAbnormal(void);
void Sys_BatteryLowDeal(void);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Other
* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void Init_Drawer(void);
void DrawOpen(void);
void OpenDraw(void);
void CloseDraw(void);
void InitBuzzer(void);
#define BuzzerOn() (BUZZER = 1)
#define BuzzerOff() (BUZZER = 0)
#define CloseBuzzer() BuzzerOff()
#define OpenBuzzer() BuzzerOn()
void Sw_Init(void);
byte Sw_Read(void);
byte Chk_Init(void);
void InitIccardPort(void);
void Sram_Test(byte flag);
void Init_ADC(void);
void isp_chk(void);
// The serial function:
void pSerialPort(void);
void Prn_Serial_Port(byte Idx_Step);
void Rst_Ser_Port(void);
void debug_ser(byte port);
void debug_ser2(byte port);
void Rst_Ser_Port(void);
// The serial function:
byte get_baud_idx(long baud, BOOL flag);
byte get_port_low(byte port_high);
byte bet_port_high(byte port_low);
/*-------------------------------------------------------*
The extend versions.
*-------------------------------------------------------*/
void InitBarCode(void);
void ClrBarCodeMode(void);
void SetBarCodeMode(void);
#ifdef SCANNER /* Support the scanner function */
void SC_DispCode(byte *Bcode);
void SC_TransBcd(void);
void SC_UpdateIndex(int oldCode, int newCode);
int SC_SearchIndex(byte *scode);
void SC_KBToBcd(byte *str);
void SC_ClrFlag(void);
int SC_CmpCode(const byte *bar1, const byte *bar2);
byte en_longnum_chk(word key);
byte SC_TranToBcd(void);
#endif /* End SCANNER */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -