?? lcm.h
字號(hào):
/******************************************************************************
* Lcm.h
* Created by : Chen huahai
* Created Date: 2004.03.01
* Copyright(c) ShenZhen WeiHua Tech Ltd.
* Decription:
******************************************************************************/
#ifndef LCM_HEAD
#define LCM_HEAD
#define LCM_12832 0
#define LCM_12864 1
#define LCM_19264 2
#define LCM LCM_19264
#if LCM == LCM_12832
#define LCM_MAX_DEPT_DISP 2
#define LCM_MAX_LINE 4
#elif LCM == LCM_12864
#define LCM_MAX_DEPT_DISP 5
#define LCM_MAX_LINE 8
#elif LCM == LCM_19264
#define LCM_MAX_DEPT_DISP 5
#define LCM_MAX_LINE 8
#endif
#define SCREEN_LINE 6 // display lines per screen
#define START_LINE 2 // display start line
#define LCM_PORT p15
#define LCM_PORT_DIR pd15
#define LCM_CS0 p14_3
#define LCM_CS0_DIR pd14_3
#define LCM_CS1 p14_4
#define LCM_CS1_DIR pd14_4
#define LCM_RS p14_0
#define LCM_RS_DIR pd14_0
#define LCM_EN p14_1
#define LCM_EN_DIR pd14_1
#define LCM_CS2 p14_5
#define LCM_CS2_DIR pd14_5
#define LCM_BL p14_2
#define LCM_BL_DIR pd14_2
//#define LCM_RW p12_5
#define LCM_OFF 0x3e
#define LCM_ON 0x3f
#define SET_X_ADDRESS 0xb8
#define SET_Y_ADDRESS 0x40
#define RAM_START_LINE 0xc0
#define LCM_BL_TIME 30000
#define LEFT_DISP 20
#define CNTER_DISP 30
#define RIGHT_DISP 40
#define CLR_DISP 1
#define RESERVE_DISP 0
#define CS2 2
#define LCD_CS_OFF 0xff
#define LCD_DI_SET 8
#define LCD_INST 0
#define LCD_DATA 1
#if LCM == LCM_12864
#define LCMLIMIT 128
#define LCMLINE 8
#define MAX_CHAR 8
#define MAX_CHAR16 16 // 16*8 font
#define MAX_CHAR57 20 // 5*7 font
#define CS0 1
#define CS1 0
#define POP_OFFSET 0
#elif LCM == LCM_19264
#define LCMLIMIT 192
#define LCMLINE 8
#define MAX_CHAR 12
#define MAX_CHAR24 8
#define MAX_CHAR16 24 // 16*8 font
#define MAX_CHAR57 31 // 5*7 font
#define CS0 1
#define CS1 0
#define POP_OFFSET 30 // 彈出窗口的顯示偏置.
#endif
#define FONT_5 0 // font define.
#define FONT_16 1
#define FONT_SP 2
#define HELP_INFO 3
#define INPUT_INFO 4
#define MAX_CHAR_POPIN 50 // POP Windows Input Max num.
void Lcm_ClrLineCn(byte startLine, byte LineNum, byte rev);
void Lcm_Disp_numCn(long num, byte dots,byte posY, byte posX,BYTE Reverse,BYTE left_right);
void Lcm_DispCn_Ex(const byte *str, byte posY, byte posX, byte lines,BYTE Reverse);
void Lcm_clr_set(byte posY,byte posX, byte len ,byte Reverse);
void Lcm_Pop(void);
void Lcm_ReCall(void);
void Lcm_DispCn24(const byte *str, byte posY, byte posX, byte maxLen, byte reverse);
void Lcm_DispCn(const byte *str, byte posX, byte posY, byte maxLen,BYTE Reverse);
void Lcm_ClrLine(byte startLine, byte num, byte rev);
void Lcm_Init(void);
void Lcm_Disp(byte *str, byte posX, byte posY, byte len, byte font, byte rev, byte pop);
void Lcm_DispPic(const byte *str);
void Lcm_ScrollBarEx(byte ttl, byte num, byte cursor, byte posX, byte len, byte posY, byte set);
void Lcm_Cursor(byte posX, byte posY, byte format, byte set);
void Lcm_PopUp(byte posX, byte posY, byte height, byte width, byte type, byte op);
void Lcm_Flush(const byte *ptr);
void Lcm_CursorPop(byte posX, byte posY, byte format, byte set);
void Menu_DispPop(const byte *ptr, byte line, byte len, byte revCnt);
void Lcm_DispDate(byte posX, byte posY, byte year, byte month, byte day, byte format, byte font, byte pop);
void Lcm_DispTime(byte posX, byte posY, byte hour, byte minute, byte second, byte format, byte font, byte pop);
void Message(byte type, ...);
byte GetInPop(byte len, byte decEn);
byte Menu_PopIn(byte len, byte decEn);
void Str_LongTo(byte *str, dword ltmp, byte dots);
void Str_LongToEx(byte *str, dword ltmp, byte cnt, byte fill);
void Str_BarCode(byte *str, const byte *Bcode);
void Str_MoveSpace(byte *obj, const byte *src, byte maxlen);
void Str_DateTo(byte *str, byte year, byte month, byte day, byte format);
void Str_TimeTo(byte *str, byte hour, byte minute, byte second, byte format);
byte GetKeyNoClr( void );
void Lcm_CursorDisp(byte set);
void Menu_PopMsg(byte type, ...);
void Lcm_ClrInputDisp(void);
byte Key_ChkValue(byte keyValue);
void Flush_Prn_Ex(byte flag1, byte flag2, word idx, long price, long quantity, long total);
void Lcm_ClrSale(void);
void MessageSubttl(void);
void MessageCash(long tmp1, byte dots1, long tmp2, byte dots2);
void Lcm_DispPicDemo(const byte *str, byte posX, byte font, byte cnt);
void Lcm_SaveDisplay(void);
extern byte const KoreaBuShou[1][1];
extern const byte dotBufSp[];
extern const byte dotBuf5x7[];
extern const byte dotBuf16x8[];
extern byte lcmCursorPosX;
extern byte lcmCursorPosY;
extern byte lcmCursorFormat;
extern byte lcmCursor;
extern byte Lcm_mirror[8][LCMLIMIT];
extern byte Lcm_mirrorOld[8][LCMLIMIT];
extern byte lcmCursorBack[16];
extern byte lcmCursorPopBak[16];
extern byte lcmCursorPosXBak;
extern byte lcmCursorPosYBak;
extern byte lcmCursorFormatBak;
extern byte lcmCursorBak;
extern byte Lcm_mirrorMessage[LCM_MAX_LINE][LCMLIMIT];
// 窗體位置坐標(biāo),用于限制窗體顯示.暫以5*7字體為單位.
extern byte lcmPopStX, lcmPopStY, lcmPopWidth, lcmPopHeight;
//extern byte lcmDispLine; // 用戶輸入顯示行.
//extern byte lcmDispPosX; // 用戶輸入顯示列位置.
extern byte popInStrBuf[MAX_CHAR_POPIN]; // 彈出窗口輸入字符緩沖.
extern byte popInNumBuf[MAX_CHAR_POPIN]; // 彈出窗口輸入數(shù)字緩沖.
extern byte popInDotBuf[MAX_CHAR_POPIN]; // 彈出窗口輸入點(diǎn)緩沖.
extern byte popInCharBuf[MAX_CHAR_POPIN]; // 彈出窗口輸入字母緩沖.
extern byte popInStrCnt; // ...
extern byte popInNumCnt; // ...
extern byte popInDecFlag;
extern byte popInDecCnt;
extern byte Lcm_dispDeptBuf[LCM_MAX_DEPT_DISP][MAX_CHAR57+2];
#define LcmBlOn() (LCM_BL = 1)
#define LcmBlOff() (LCM_BL = 0)
/******************************************************************************
End of File
******************************************************************************/
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -