#ifndef __G45LCD_H
#define __G45LCD_H

#ifdef __cplusplus
extern "C" {
#endif

void LCD_Init(void);
/*
Initialize parameters about LCD functions in the library
*/

void LCD_BackLight_On(void);
/*
Turn on the LCD backlight
*/

void LCD_BackLight_Off(void);
/*
Turn off the LCD backlight
*/

void LCD_ShowText(uchar Text);
/*
Display one character on the LCD panel, and the cursor will right-shifted by one character position automatically

Parameters:
    Text: Display character 
*/

void LCD_DisplayNumber(int Mode);
/*
After calling either the LCD_SetNumber, LCD_ClrNumber or LCD_DisplayStr, it is necessary to call LCD_DisplayNumber 
to display number on the the LCD panel

Parameters:
    Mode: 0=blocked
          1=non-blocked (for LCD_DisplayStr() only)
*/

void LCD_SetNumber(int Line, int Offset, int Number);
/*
Display one number (32*24) on the specified position

Parameters:
    Line: One of two line numbers (1 to 2)
    Offset: Cursor position (1 to 5)
    Number: Display number
*/

void LCD_ClrNumber(int Line, int Offset);
/*
Clear the displayed number by one character position

Parameters:
    Line: One of two line numbers (1 to 2)
    Offset: Cursor position (1 to 5)
*/

void LCD_SetNumberWithDot(int Offset, int Number, int Dot);
/*
Display one number (42*16) and also show the dot on the specified position

Parameters:
    Offset: Cursor position (1 to 6)
    Number: Display number
    Dot: Display the dot
*/

void LCD_ClrNumberWithDot(int Offset);
/*
Clear the displayed number and also the dot by one character position

Parameters:
    Offset: Cursor position (1 to 5)
*/

void LCD_DisplayStr(char *Str);
/*
Display one integer or float that the length of number does not exceed 6 numbers
    
Parameters:
    Buffer: The string ((ending with '\0') to be displayed
*/


void LCD_ClrScrn(void);
/*
Clear the LCD panel
*/

void LCD_StandByMode(void);
/*
Enter the stand by mode, and it can be terminated by either LCD_NormalMode() or other function
*/

void LCD_NormalMode(void);
/*
Restore the LCD to normal mode when it is in the stand by mode
*/

void LCD_GotoPosition(int Line, int Offset);
/*
Move the cursor to the specified position

Parameters:
    Line: One of four line numbers (1 to 4)
    Offset: Cursor position (1 to 8)
*/

void LCD_CursorDisplay(int Display, int Blink);
/*
Set the Cursor display status

Parameters:
    Display: Cursor display on/off
             1: Display on
             2: Display off
    Blink: Character blink on/off
             1: Display on
             2: Display off 
*/

void LCD_LineReverse(int Line);
/*
Select one of four line and reverse the display

Parameters:
    Line: One of two disk numbers (0 or 1)
*/

void LCD_LineRestore(int Line);
/*
Select one of four line and restore the display

Parameters:
    Line: One of four line numbers (1 to 4)
*/

void LCD_GetLibDate(unsigned char *LibDate);
/*
Gets the create date of funciton library
*/

unsigned LCD_GetLibVersion(void);
/*
Gets the version number of function library

Return:
    Returns the current version number
*/

#ifdef __cplusplus
}
#endif

#endif