

#define KS0108_SCREEN_WIDTH		128
#define KS0108_SCREEN_HEIGHT	64
#define KS0108_SCREEN_HEIGHT_8	8



#define DISPLAY_SET_Y       0x40
#define DISPLAY_SET_X       0xB8
#define DISPLAY_START_LINE  0xC0
#define DISPLAY_ON_CMD		0x3E
#define DISPLAY_ON	0x01
#define DISPLAY_OFF	0x00
#define DISPLAY_STATUS_BUSY	0x80
#define KS0108_FONT_HEIGHT 9

#define	Buffer_Refresh(buf, xb, yb, dxb, dyb);	{\
                                GLCD_WriteBuf(buf, xb, yb, dxb, dyb)\
                                ; }


void GLCD_Initalize(void);
void GLCD_WriteData(unsigned char);
void GLCD_WriteCommand(unsigned char, unsigned char);
void GLCD_ClearScreen(void);
void GLCD_WriteChar_12x7(unsigned char, unsigned char, unsigned char);
void GLCD_GoTo(unsigned char, unsigned char);
void GLCD_WriteString(char *);
unsigned char GLCD_ReadByteFromROMMemory(char *);
unsigned char GLCD_ReadData(void);
void GLCD_Bitmap(char *, unsigned char, unsigned char, unsigned char, unsigned char);
void GLCD_SetPixel(unsigned char, unsigned char, unsigned char);
void GLCD_ClearPixel(unsigned char, unsigned char, unsigned char);