/*******************************************************************************
*                                                                            
*	Filename:	Demo.h
* 
*  	Author:		Duke Chang
*	Company:    	RAiO Technology Inc.
*	Case:		320x240
*	Device:		MXIC MX10E8050IQC at 18.432MHz
*   	Date:       	2005/10/1
*	Modifier:	Duke Chang
*	Modify Date:    2005/10/13
*   	Visions:   	1.0
*   	Compiled Using Keil C v7.50
*	
*******************************************************************************/

#include <stdio.h>
#include <intrins.h>
#include "MX10E8051I.h"
#include "RA8803Reg.h"
#include "UserDef.h"

//------------------------------------------------------------------------------
//Complier Defines
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
//Parameter Defines
//------------------------------------------------------------------------------
//===== LCD Panel Size =====
#ifdef P320x240
#define cXSize		40
#define cYSize		240
#endif

//------------------------------------------------------------------------------
//Subroutine Declare
//------------------------------------------------------------------------------
void Test_Pattern(void);
void Test_Font(void);
void Test_Touch(void);

//RA8803 LCD Controller Function
extern void LCD_Reset(void);
extern void LCD_Initial(void);
extern void LCD_ON(void);
extern void LCD_OFF(void);
extern void LCD_GotoXY(uchar, uchar);
extern void LCD_Graphic(void);
extern void LCD_Text(void);
extern void LCD_CmdWrite(uchar, uchar);
extern uchar LCD_CmdRead(uchar);
extern void LCD_DataWrite(uchar);
extern uchar LCD_DataRead(void);
extern void LCD_Bold(void);
extern void LCD_NoBold(void);
extern void LCD_Inv(void);
extern void LCD_NoInv(void);
extern void LCD_GInv(void);
extern void LCD_NoGInv(void);
extern void LCD_Blk(void);
extern void LCD_NoBlk(void);
extern void LCD_BlkTim(uchar);
extern void LCD_Cur(void);
extern void LCD_NoCur(void);
extern void LCD_CurBlk(void);
extern void LCD_NoCurBlk(void);
extern void LCD_CurHei(uchar);
extern void LCD_SWRst(void);
extern void LCD_Clear(void);
extern void LCD_AlignOn(void);
extern void LCD_AlignOff(void);
extern void LCD_FontSize(uchar buf);
extern uchar ADC_Touch(void);
extern void ADC_On(void);
extern void ADC_Off(void);
extern uchar ADC_Y(void);
extern uchar ADC_X(void);
extern void Print_Hex(uchar buf);

extern void LCD_PrintStrD100ms(uchar *ptr, uchar x, uchar y, uchar time);
extern void LCD_PrintStr(uchar *ptr, uchar x);

//Delay Function
extern void Delay2us(uchar);
extern void Delay100us(uchar);
extern void Delay1ms(uchar);
extern void Delay10ms(uchar);
extern void Delay100ms(uchar);

//------------------------------------------------------------------------------
//Const Declare
//------------------------------------------------------------------------------
uchar code sRAiO0[] = "                                        ";

#ifdef BIG5_Code
uchar code sRAiO1[] = "     ·ç ¦ö ¬ì §Þ ªÑ ¥÷ ¦³ ­­ ¤½ ¥q      ";
#endif

#ifdef GB_Code
uchar code sRAiO1[] = "     Èð ÓÓ ¿Æ ¼¼ ¹É ·Ý ÓÐ ÏÞ ¹« Ë¾      ";
#endif

uchar code sRAiO2[] = " ====================================== ";

#ifdef Parallel_8080
uchar code sRAiO3[] = "     Parallel 8080 8-Bit Interface      ";
#endif

#ifdef Parallel_6800
uchar code sRAiO3[] = "     Parallel 6800 8-Bit Interface      ";
#endif

#ifdef BIG5_Code
uchar code sRAiO4[] = "¼Ò ²Õ ´ú ¸Õ";
#endif

#ifdef GB_Code
uchar code sRAiO4[] = "Ä£ ×é ²â ÊÔ";
#endif

uchar code sRAiO5[] = "Un-Touch!! X=      Y=";
uchar code sRAiO6[] = "Un-Touch!!";
uchar code sRAiO7[] = "   Touch!!";

//------------------------------------------------------------------------------
//Variable Declare
//------------------------------------------------------------------------------
