📄 lcd.h
字号:
/*
###############################################################################
File Name : LCD.H
Version : 1.0
Description : LCD Basic Function Definition
Modified History
Modified : 2002/03/13
Description : Eliminate unused functions
###############################################################################
*/
/*
###############################################################################
Include Part
###############################################################################
*/
/*
###############################################################################
Define Part
###############################################################################
*/
// LCD Command Write Register
#define LcdCommandW (*((unsigned char xdata *)0x09000))
// LCD Command Read Register
#define LcdCommandR (*((unsigned char xdata *)0x09001))
// LCD Data Write Register
#define LcdDataW (*((unsigned char xdata *)0x09002))
// LCD Data Read Register
#define LcdDataR (*((unsigned char xdata *)0x09003))
/* If there are unused functions in program and on compiling with Keil-C, it result in warning.In this reason, wrong operation could be happend.
So it prevent to compile unused functions to use define-function.
*/
#define __LCD_UNUSED // If defined with " __LCD_UNUSED", actually it's not to be compiled "__LCD_UNUSED Block"
/*
###############################################################################
Grobal Variable Definition Part
###############################################################################
*/
/*
###############################################################################
Function Prototype Definition Part
###############################################################################
*/
/*
Description : Check for LCD to be ready
Argument :
Return Value : If it's ready ,then '1',else then '-1'.
Note : If LCD Device is not insert actually,then return '-1'.
*/
extern char LcdReady(void);
/*
Description : Clear LCD.
Argument :
Return Value :
Note :
*/
extern void ClrScr(void);
/*
Description : Initialize LCD.
Argument :
Return Value : If initialization is O.K, then return '1', else then return '-1'.
Note
*/
extern char InitLcd(void);
/*
Description : Output character string in current Cursor.
Argument : str - Character to be output in LCD. (INPUT)
Return Value : Character string's Pointer to be output
Note :
*/
extern void GotoXY(unsigned char x, unsigned char y);
/*
Description : Output character stream in current Cursor.
Argument : str - Character to be output in LCD. (INPUT)
Return Value : Character string's Pointer to be output
Note :
*/
extern char *Puts(char* str);
/*
Description : Output 1 character in current Cursor.
Argument : str - Character to be output in LCD.(INPUT)
Return Value :
Note :
*/
extern void Putch(char ch);
/*
###############################################################################
Unused Function Prototype Definition Part
###############################################################################
*/
#ifndef __LCD_UNUSED
/*
Description : Move Cursor first Column.
Argument :
Return Value :
Note :
*/
extern void HomeCursor(void);
/*
Description : Decide Cursor type.
Argument : type - Cursor type(INPUT)
Return Value :
Note :
*/
extern void SetCursorType(unsigned char type);
/*
Description : Shift to Left and Right current Cursor.
Argument : dir - Decide direction to be Shift.(INPUT) dir !=0 -> Right Shift, dir == 0 -> Left Shift
Return Value :
Note :
*/
extern void ShiftCursor(unsigned char dir);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -