求OTM8009A驱动程序 下面是例子 我用杜邦线链接驱动不了

2019-07-20 11:59发布

本帖最后由 玩转STM32001 于 2016-3-31 11:11 编辑

#include "TFT.h"
#include "stm32f10x.h"
#include "delay.h"
//LCDµÄ» ±ÊÑÕÉ«ºÍ±³¾°É«   
u16 POINT_COLOR=0x0000; //» ±ÊÑÕÉ«
u16 BACK_COLOR=0xFFFF;  //±³¾°É«
//¹ÜÀíLCDÖØÒª²ÎÊý
//ĬÈÏΪÊúÆÁ
_lcd_dev lcddev;
//³£ÓÃASCII±í
//Æ«ÒÆÁ¿32
//ASCII×Ö·û¼¯
//Æ«ÒÆÁ¿32
//´óС:12*6
const unsigned char asc2_1206[95][12]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{0x00,0x00,0x00,0x00,0x3F,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
{0x00,0x00,0x30,0x00,0x40,0x00,0x30,0x00,0x40,0x00,0x00,0x00},/*""",2*/
{0x09,0x00,0x0B,0xC0,0x3D,0x00,0x0B,0xC0,0x3D,0x00,0x09,0x00},/*"#",3*/
{0x18,0xC0,0x24,0x40,0x7F,0xE0,0x22,0x40,0x31,0x80,0x00,0x00},/*"$",4*/
{0x18,0x00,0x24,0xC0,0x1B,0x00,0x0D,0x80,0x32,0x40,0x01,0x80},/*"%",5*/
{0x03,0x80,0x1C,0x40,0x27,0x40,0x1C,0x80,0x07,0x40,0x00,0x40},/*"&",6*/
{0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x20,0x40,0x40,0x20},/*"(",8*/
{0x00,0x00,0x40,0x20,0x20,0x40,0x1F,0x80,0x00,0x00,0x00,0x00},/*")",9*/
{0x09,0x00,0x06,0x00,0x1F,0x80,0x06,0x00,0x09,0x00,0x00,0x00},/*"*",10*/
{0x04,0x00,0x04,0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0x00,0x00},/*"+",11*/
{0x00,0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
{0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00},/*"-",13*/
{0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
{0x00,0x20,0x01,0xC0,0x06,0x00,0x38,0x00,0x40,0x00,0x00,0x00},/*"/",15*/
{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"0",16*/
{0x00,0x00,0x10,0x40,0x3F,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"1",17*/
{0x18,0xC0,0x21,0x40,0x22,0x40,0x24,0x40,0x18,0x40,0x00,0x00},/*"2",18*/
{0x10,0x80,0x20,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"3",19*/
{0x02,0x00,0x0D,0x00,0x11,0x00,0x3F,0xC0,0x01,0x40,0x00,0x00},/*"4",20*/
{0x3C,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x23,0x80,0x00,0x00},/*"5",21*/
{0x1F,0x80,0x24,0x40,0x24,0x40,0x34,0x40,0x03,0x80,0x00,0x00},/*"6",22*/
{0x30,0x00,0x20,0x00,0x27,0xC0,0x38,0x00,0x20,0x00,0x00,0x00},/*"7",23*/
{0x1B,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"8",24*/
{0x1C,0x00,0x22,0xC0,0x22,0x40,0x22,0x40,0x1F,0x80,0x00,0x00},/*"9",25*/
{0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
{0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
{0x00,0x00,0x04,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0x40,0x40},/*"<",28*/
{0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x00,0x00},/*"=",29*/
{0x00,0x00,0x40,0x40,0x20,0x80,0x11,0x00,0x0A,0x00,0x04,0x00},/*">",30*/
{0x18,0x00,0x20,0x00,0x23,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"?",31*/
{0x1F,0x80,0x20,0x40,0x27,0x40,0x29,0x40,0x1F,0x40,0x00,0x00},/*"@",32*/
{0x00,0x40,0x07,0xC0,0x39,0x00,0x0F,0x00,0x01,0xC0,0x00,0x40},/*"A",33*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"B",34*/
{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x30,0x80,0x00,0x00},/*"C",35*/
{0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"D",36*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x40,0x30,0xC0,0x00,0x00},/*"E",37*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x00,0x30,0x00,0x00,0x00},/*"F",38*/
{0x0F,0x00,0x10,0x80,0x20,0x40,0x22,0x40,0x33,0x80,0x02,0x00},/*"G",39*/
{0x20,0x40,0x3F,0xC0,0x04,0x00,0x04,0x00,0x3F,0xC0,0x20,0x40},/*"H",40*/
{0x20,0x40,0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x00,0x00},/*"I",41*/
{0x00,0x60,0x20,0x20,0x20,0x20,0x3F,0xC0,0x20,0x00,0x20,0x00},/*"J",42*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x0B,0x00,0x30,0xC0,0x20,0x40},/*"K",43*/
{0x20,0x40,0x3F,0xC0,0x20,0x40,0x00,0x40,0x00,0x40,0x00,0xC0},/*"L",44*/
{0x3F,0xC0,0x3C,0x00,0x03,0xC0,0x3C,0x00,0x3F,0xC0,0x00,0x00},/*"M",45*/
{0x20,0x40,0x3F,0xC0,0x0C,0x40,0x23,0x00,0x3F,0xC0,0x20,0x00},/*"N",46*/
{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"O",47*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"",48*/
{0x1F,0x80,0x21,0x40,0x21,0x40,0x20,0xE0,0x1F,0xA0,0x00,0x00},/*"Q",49*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x26,0x00,0x19,0xC0,0x00,0x40},/*"R",50*/
{0x18,0xC0,0x24,0x40,0x24,0x40,0x22,0x40,0x31,0x80,0x00,0x00},/*"S",51*/
{0x30,0x00,0x20,0x40,0x3F,0xC0,0x20,0x40,0x30,0x00,0x00,0x00},/*"T",52*/
{0x20,0x00,0x3F,0x80,0x00,0x40,0x00,0x40,0x3F,0x80,0x20,0x00},/*"U",53*/
{0x20,0x00,0x3E,0x00,0x01,0xC0,0x07,0x00,0x38,0x00,0x20,0x00},/*"V",54*/
{0x38,0x00,0x07,0xC0,0x3C,0x00,0x07,0xC0,0x38,0x00,0x00,0x00},/*"W",55*/
{0x20,0x40,0x39,0xC0,0x06,0x00,0x39,0xC0,0x20,0x40,0x00,0x00},/*"X",56*/
{0x20,0x00,0x38,0x40,0x07,0xC0,0x38,0x40,0x20,0x00,0x00,0x00},/*"Y",57*/
{0x30,0x40,0x21,0xC0,0x26,0x40,0x38,0x40,0x20,0xC0,0x00,0x00},/*"Z",58*/
{0x00,0x00,0x00,0x00,0x7F,0xE0,0x40,0x20,0x40,0x20,0x00,0x00},/*"[",59*/
{0x00,0x00,0x70,0x00,0x0C,0x00,0x03,0x80,0x00,0x40,0x00,0x00},/*"",60*/
{0x00,0x00,0x40,0x20,0x40,0x20,0x7F,0xE0,0x00,0x00,0x00,0x00},/*"]",61*/
{0x00,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
{0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10},/*"_",63*/
{0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
{0x00,0x00,0x02,0x80,0x05,0x40,0x05,0x40,0x03,0xC0,0x00,0x40},/*"a",65*/
{0x20,0x00,0x3F,0xC0,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"b",66*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x06,0x40,0x00,0x00},/*"c",67*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x24,0x40,0x3F,0xC0,0x00,0x40},/*"d",68*/
{0x00,0x00,0x03,0x80,0x05,0x40,0x05,0x40,0x03,0x40,0x00,0x00},/*"e",69*/
{0x00,0x00,0x04,0x40,0x1F,0xC0,0x24,0x40,0x24,0x40,0x20,0x00},/*"f",70*/
{0x00,0x00,0x02,0xE0,0x05,0x50,0x05,0x50,0x06,0x50,0x04,0x20},/*"g",71*/
{0x20,0x40,0x3F,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"h",72*/
{0x00,0x00,0x04,0x40,0x27,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"i",73*/
{0x00,0x10,0x00,0x10,0x04,0x10,0x27,0xE0,0x00,0x00,0x00,0x00},/*"j",74*/
{0x20,0x40,0x3F,0xC0,0x01,0x40,0x07,0x00,0x04,0xC0,0x04,0x40},/*"k",75*/
{0x20,0x40,0x20,0x40,0x3F,0xC0,0x00,0x40,0x00,0x40,0x00,0x00},/*"l",76*/
{0x07,0xC0,0x04,0x00,0x07,0xC0,0x04,0x00,0x03,0xC0,0x00,0x00},/*"m",77*/
{0x04,0x40,0x07,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"n",78*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"o",79*/
{0x04,0x10,0x07,0xF0,0x04,0x50,0x04,0x40,0x03,0x80,0x00,0x00},/*"p",80*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x50,0x07,0xF0,0x00,0x10},/*"q",81*/
{0x04,0x40,0x07,0xC0,0x02,0x40,0x04,0x00,0x04,0x00,0x00,0x00},/*"r",82*/
{0x00,0x00,0x06,0x40,0x05,0x40,0x05,0x40,0x04,0xC0,0x00,0x00},/*"s",83*/
{0x00,0x00,0x04,0x00,0x1F,0x80,0x04,0x40,0x00,0x40,0x00,0x00},/*"t",84*/
{0x04,0x00,0x07,0x80,0x00,0x40,0x04,0x40,0x07,0xC0,0x00,0x40},/*"u",85*/
{0x04,0x00,0x07,0x00,0x04,0xC0,0x01,0x80,0x06,0x00,0x04,0x00},/*"v",86*/
{0x06,0x00,0x01,0xC0,0x07,0x00,0x01,0xC0,0x06,0x00,0x00,0x00},/*"w",87*/
{0x04,0x40,0x06,0xC0,0x01,0x00,0x06,0xC0,0x04,0x40,0x00,0x00},/*"x",88*/
{0x04,0x10,0x07,0x10,0x04,0xE0,0x01,0x80,0x06,0x00,0x04,0x00},/*"y",89*/
{0x00,0x00,0x04,0x40,0x05,0xC0,0x06,0x40,0x04,0x40,0x00,0x00},/*"z",90*/
{0x00,0x00,0x00,0x00,0x04,0x00,0x7B,0xE0,0x40,0x20,0x00,0x00},/*"{",91*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0x00},/*"|",92*/
{0x00,0x00,0x40,0x20,0x7B,0xE0,0x04,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
{0x40,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x40,0x00},/*"~",94*/
};
const unsigned char asc2_1608[95][16]={   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCC,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
{0x00,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x00,0x00},/*""",2*/
{0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x00,0x00},/*"#",3*/
{0x00,0x00,0x0E,0x18,0x11,0x04,0x3F,0xFF,0x10,0x84,0x0C,0x78,0x00,0x00,0x00,0x00},/*"$",4*/
{0x0F,0x00,0x10,0x84,0x0F,0x38,0x00,0xC0,0x07,0x78,0x18,0x84,0x00,0x78,0x00,0x00},/*"%",5*/
{0x00,0x78,0x0F,0x84,0x10,0xC4,0x11,0x24,0x0E,0x98,0x00,0xE4,0x00,0x84,0x00,0x08},/*"&",6*/
{0x08,0x00,0x68,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x18,0x18,0x20,0x04,0x40,0x02,0x00,0x00},/*"(",8*/
{0x00,0x00,0x40,0x02,0x20,0x04,0x18,0x18,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/
{0x02,0x40,0x02,0x40,0x01,0x80,0x0F,0xF0,0x01,0x80,0x02,0x40,0x02,0x40,0x00,0x00},/*"*",10*/
{0x00,0x80,0x00,0x80,0x00,0x80,0x0F,0xF8,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00},/*"+",11*/
{0x00,0x01,0x00,0x0D,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
{0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80},/*"-",13*/
{0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
{0x00,0x00,0x00,0x06,0x00,0x18,0x00,0x60,0x01,0x80,0x06,0x00,0x18,0x00,0x20,0x00},/*"/",15*/
{0x00,0x00,0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"0",16*/
{0x00,0x00,0x08,0x04,0x08,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"1",17*/
{0x00,0x00,0x0E,0x0C,0x10,0x14,0x10,0x24,0x10,0x44,0x11,0x84,0x0E,0x0C,0x00,0x00},/*"2",18*/
{0x00,0x00,0x0C,0x18,0x10,0x04,0x11,0x04,0x11,0x04,0x12,0x88,0x0C,0x70,0x00,0x00},/*"3",19*/
{0x00,0x00,0x00,0xE0,0x03,0x20,0x04,0x24,0x08,0x24,0x1F,0xFC,0x00,0x24,0x00,0x00},/*"4",20*/
{0x00,0x00,0x1F,0x98,0x10,0x84,0x11,0x04,0x11,0x04,0x10,0x88,0x10,0x70,0x00,0x00},/*"5",21*/
{0x00,0x00,0x07,0xF0,0x08,0x88,0x11,0x04,0x11,0x04,0x18,0x88,0x00,0x70,0x00,0x00},/*"6",22*/
{0x00,0x00,0x1C,0x00,0x10,0x00,0x10,0xFC,0x13,0x00,0x1C,0x00,0x10,0x00,0x00,0x00},/*"7",23*/
{0x00,0x00,0x0E,0x38,0x11,0x44,0x10,0x84,0x10,0x84,0x11,0x44,0x0E,0x38,0x00,0x00},/*"8",24*/
{0x00,0x00,0x07,0x00,0x08,0x8C,0x10,0x44,0x10,0x44,0x08,0x88,0x07,0xF0,0x00,0x00},/*"9",25*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
{0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
{0x00,0x00,0x00,0x80,0x01,0x40,0x02,0x20,0x04,0x10,0x08,0x08,0x10,0x04,0x00,0x00},/*"<",28*/
{0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x00,0x00},/*"=",29*/
{0x00,0x00,0x10,0x04,0x08,0x08,0x04,0x10,0x02,0x20,0x01,0x40,0x00,0x80,0x00,0x00},/*">",30*/
{0x00,0x00,0x0E,0x00,0x12,0x00,0x10,0x0C,0x10,0x6C,0x10,0x80,0x0F,0x00,0x00,0x00},/*"?",31*/
{0x03,0xE0,0x0C,0x18,0x13,0xE4,0x14,0x24,0x17,0xC4,0x08,0x28,0x07,0xD0,0x00,0x00},/*"@",32*/
{0x00,0x04,0x00,0x3C,0x03,0xC4,0x1C,0x40,0x07,0x40,0x00,0xE4,0x00,0x1C,0x00,0x04},/*"A",33*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x11,0x04,0x0E,0x88,0x00,0x70,0x00,0x00},/*"B",34*/
{0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x08,0x1C,0x10,0x00,0x00},/*"C",35*/
{0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"D",36*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x17,0xC4,0x10,0x04,0x08,0x18,0x00,0x00},/*"E",37*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x17,0xC0,0x10,0x00,0x08,0x00,0x00,0x00},/*"F",38*/
{0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x44,0x1C,0x78,0x00,0x40,0x00,0x00},/*"G",39*/
{0x10,0x04,0x1F,0xFC,0x10,0x84,0x00,0x80,0x00,0x80,0x10,0x84,0x1F,0xFC,0x10,0x04},/*"H",40*/
{0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x00,0x00,0x00,0x00},/*"I",41*/
{0x00,0x03,0x00,0x01,0x10,0x01,0x10,0x01,0x1F,0xFE,0x10,0x00,0x10,0x00,0x00,0x00},/*"J",42*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x03,0x80,0x14,0x64,0x18,0x1C,0x10,0x04,0x00,0x00},/*"K",43*/
{0x10,0x04,0x1F,0xFC,0x10,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x0C,0x00,0x00},/*"L",44*/
{0x10,0x04,0x1F,0xFC,0x1F,0x00,0x00,0xFC,0x1F,0x00,0x1F,0xFC,0x10,0x04,0x00,0x00},/*"M",45*/
{0x10,0x04,0x1F,0xFC,0x0C,0x04,0x03,0x00,0x00,0xE0,0x10,0x18,0x1F,0xFC,0x10,0x00},/*"N",46*/
{0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"O",47*/
{0x10,0x04,0x1F,0xFC,0x10,0x84,0x10,0x80,0x10,0x80,0x10,0x80,0x0F,0x00,0x00,0x00},/*"",48*/
{0x07,0xF0,0x08,0x18,0x10,0x24,0x10,0x24,0x10,0x1C,0x08,0x0A,0x07,0xF2,0x00,0x00},/*"Q",49*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x11,0xC0,0x11,0x30,0x0E,0x0C,0x00,0x04},/*"R",50*/
{0x00,0x00,0x0E,0x1C,0x11,0x04,0x10,0x84,0x10,0x84,0x10,0x44,0x1C,0x38,0x00,0x00},/*"S",51*/
{0x18,0x00,0x10,0x00,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x00,0x18,0x00,0x00,0x00},/*"T",52*/
{0x10,0x00,0x1F,0xF8,0x10,0x04,0x00,0x04,0x00,0x04,0x10,0x04,0x1F,0xF8,0x10,0x00},/*"U",53*/
{0x10,0x00,0x1E,0x00,0x11,0xE0,0x00,0x1C,0x00,0x70,0x13,0x80,0x1C,0x00,0x10,0x00},/*"V",54*/
{0x1F,0xC0,0x10,0x3C,0x00,0xE0,0x1F,0x00,0x00,0xE0,0x10,0x3C,0x1F,0xC0,0x00,0x00},/*"W",55*/
{0x10,0x04,0x18,0x0C,0x16,0x34,0x01,0xC0,0x01,0xC0,0x16,0x34,0x18,0x0C,0x10,0x04},/*"X",56*/
{0x10,0x00,0x1C,0x00,0x13,0x04,0x00,0xFC,0x13,0x04,0x1C,0x00,0x10,0x00,0x00,0x00},/*"Y",57*/
{0x08,0x04,0x10,0x1C,0x10,0x64,0x10,0x84,0x13,0x04,0x1C,0x04,0x10,0x18,0x00,0x00},/*"Z",58*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x40,0x02,0x40,0x02,0x40,0x02,0x00,0x00},/*"[",59*/
{0x00,0x00,0x30,0x00,0x0C,0x00,0x03,0x80,0x00,0x60,0x00,0x1C,0x00,0x03,0x00,0x00},/*"",60*/
{0x00,0x00,0x40,0x02,0x40,0x02,0x40,0x02,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00},/*"]",61*/
{0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00},/*"^",62*/
{0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01},/*"_",63*/
{0x00,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
{0x00,0x00,0x00,0x98,0x01,0x24,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xFC,0x00,0x04},/*"a",65*/
{0x10,0x00,0x1F,0xFC,0x00,0x88,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00},/*"b",66*/
{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x00},/*"c",67*/
{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x11,0x08,0x1F,0xFC,0x00,0x04},/*"d",68*/
{0x00,0x00,0x00,0xF8,0x01,0x44,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xC8,0x00,0x00},/*"e",69*/
{0x00,0x00,0x01,0x04,0x01,0x04,0x0F,0xFC,0x11,0x04,0x11,0x04,0x11,0x00,0x18,0x00},/*"f",70*/
{0x00,0x00,0x00,0xD6,0x01,0x29,0x01,0x29,0x01,0x29,0x01,0xC9,0x01,0x06,0x00,0x00},/*"g",71*/
{0x10,0x04,0x1F,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04},/*"h",72*/
{0x00,0x00,0x01,0x04,0x19,0x04,0x19,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"i",73*/
{0x00,0x00,0x00,0x03,0x00,0x01,0x01,0x01,0x19,0x01,0x19,0xFE,0x00,0x00,0x00,0x00},/*"j",74*/
{0x10,0x04,0x1F,0xFC,0x00,0x24,0x00,0x40,0x01,0xB4,0x01,0x0C,0x01,0x04,0x00,0x00},/*"k",75*/
{0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"l",76*/
{0x01,0x04,0x01,0xFC,0x01,0x04,0x01,0x00,0x01,0xFC,0x01,0x04,0x01,0x00,0x00,0xFC},/*"m",77*/
{0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04},/*"n",78*/
{0x00,0x00,0x00,0xF8,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0xF8,0x00,0x00},/*"o",79*/
{0x01,0x01,0x01,0xFF,0x00,0x85,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00},/*"p",80*/
{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0xFF,0x00,0x01},/*"q",81*/
{0x01,0x04,0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x04,0x01,0x00,0x01,0x80,0x00,0x00},/*"r",82*/
{0x00,0x00,0x00,0xCC,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x98,0x00,0x00},/*"s",83*/
{0x00,0x00,0x01,0x00,0x01,0x00,0x07,0xF8,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00},/*"t",84*/
{0x01,0x00,0x01,0xF8,0x00,0x04,0x00,0x04,0x00,0x04,0x01,0x08,0x01,0xFC,0x00,0x04},/*"u",85*/
{0x01,0x00,0x01,0x80,0x01,0x70,0x00,0x0C,0x00,0x10,0x01,0x60,0x01,0x80,0x01,0x00},/*"v",86*/
{0x01,0xF0,0x01,0x0C,0x00,0x30,0x01,0xC0,0x00,0x30,0x01,0x0C,0x01,0xF0,0x01,0x00},/*"w",87*/
{0x00,0x00,0x01,0x04,0x01,0x8C,0x00,0x74,0x01,0x70,0x01,0x8C,0x01,0x04,0x00,0x00},/*"x",88*/
{0x01,0x01,0x01,0x81,0x01,0x71,0x00,0x0E,0x00,0x18,0x01,0x60,0x01,0x80,0x01,0x00},/*"y",89*/
{0x00,0x00,0x01,0x84,0x01,0x0C,0x01,0x34,0x01,0x44,0x01,0x84,0x01,0x0C,0x00,0x00},/*"z",90*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3E,0xFC,0x40,0x02,0x40,0x02},/*"{",91*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00},/*"|",92*/
{0x00,0x00,0x40,0x02,0x40,0x02,0x3E,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
{0x00,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,0x00},/*"~",94*/
};

//&ETH;&acute;&frac14;&Auml;&acute;&aelig;&AElig;÷&ordm;&macr;&Ecirc;&yacute;
//regval:&frac14;&Auml;&acute;&aelig;&AElig;÷&Ouml;&micro;
void LCD_WR_REG(u16 regval)
{
LCD->LCD_REG=regval;//&ETH;&acute;&Egrave;&euml;&Ograve;&ordf;&ETH;&acute;&micro;&Auml;&frac14;&Auml;&acute;&aelig;&AElig;÷&ETH;ò&ordm;&Aring;  
}
//&ETH;&acute;LCD&Ecirc;&yacute;&frac34;&Yacute;
//data:&Ograve;&ordf;&ETH;&acute;&Egrave;&euml;&micro;&Auml;&Ouml;&micro;
void LCD_WR_DATA(u16 data)
{                  
LCD->LCD_RAM=data;   
}
//&para;&Aacute;LCD&Ecirc;&yacute;&frac34;&Yacute;
//·&micro;&raquo;&Oslash;&Ouml;&micro;:&para;&Aacute;&micro;&frac12;&micro;&Auml;&Ouml;&micro;
u16 LCD_RD_DATA(void)
{                  
return LCD->LCD_RAM;   
}        
//&ETH;&acute;&frac14;&Auml;&acute;&aelig;&AElig;÷
//LCD_WR_REG:&frac14;&Auml;&acute;&aelig;&AElig;÷&micro;&Oslash;&Ouml;·
//LCD_WR_REGValue:&Ograve;&ordf;&ETH;&acute;&Egrave;&euml;&micro;&Auml;&Ecirc;&yacute;&frac34;&Yacute;
void LCD_WriteReg(u16 LCD_WR_REG, u16 LCD_WR_REGValue)
{
LCD->LCD_REG = LCD_WR_REG;  //&ETH;&acute;&Egrave;&euml;&Ograve;&ordf;&ETH;&acute;&micro;&Auml;&frac14;&Auml;&acute;&aelig;&AElig;÷&ETH;ò&ordm;&Aring;
   
LCD->LCD_RAM = LCD_WR_REGValue;//&ETH;&acute;&Egrave;&euml;&Ecirc;&yacute;&frac34;
      
}   
//&para;&Aacute;&frac14;&Auml;&acute;&aelig;&AElig;÷
//LCD_Reg:&frac14;&Auml;&acute;&aelig;&AElig;÷&micro;&Oslash;&Ouml;·
//·&micro;&raquo;&Oslash;&Ouml;&micro;:&para;&Aacute;&micro;&frac12;&micro;&Auml;&Ecirc;&yacute;&frac34;&Yacute;
u16 LCD_ReadReg(u8 LCD_Reg)
{            
LCD_WR_REG(LCD_Reg);  //&ETH;&acute;&Egrave;&euml;&Ograve;&ordf;&para;&Aacute;&micro;&Auml;&frac14;&Auml;&acute;&aelig;&AElig;÷&ETH;ò&ordm;&Aring;
delay_us(5);   
return LCD_RD_DATA();  //·&micro;&raquo;&Oslash;&para;&Aacute;&micro;&frac12;&micro;&Auml;&Ouml;&micro;
}   
//&iquest;&ordf;&Ecirc;&frac14;&ETH;&acute;GRAM
void LCD_WriteRAM_Prepare(void)
{
  LCD->LCD_REG=lcddev.wramcmd;
  
}  
//LCD&ETH;&acute;GRAM
//RGB_Code:&Ntilde;&Otilde;&Eacute;&laquo;&Ouml;&micro;
void LCD_WriteRAM(u16 RGB_Code)
{           
LCD->LCD_RAM = RGB_Code;//&ETH;&acute;&Ecirc;&reg;&Aacute;ù&Icirc;&raquo;GRAM
}
//&acute;&Oacute;ILI93xx&para;&Aacute;&sup3;&ouml;&micro;&Auml;&Ecirc;&yacute;&frac34;&Yacute;&Icirc;&ordf;GBR&cedil;&ntilde;&Ecirc;&frac12;&pound;&not;&para;&oslash;&Icirc;&Ograve;&Atilde;&Ccedil;&ETH;&acute;&Egrave;&euml;&micro;&Auml;&Ecirc;±&ordm;ò&Icirc;&ordf;RGB&cedil;&ntilde;&Ecirc;&frac12;&iexcl;&pound;
//&Iacute;¨&sup1;&yacute;&cedil;&Atilde;&ordm;&macr;&Ecirc;&yacute;×&ordf;&raquo;&raquo;
//c:GBR&cedil;&ntilde;&Ecirc;&frac12;&micro;&Auml;&Ntilde;&Otilde;&Eacute;&laquo;&Ouml;&micro;
//·&micro;&raquo;&Oslash;&Ouml;&micro;&pound;&ordm;RGB&cedil;&ntilde;&Ecirc;&frac12;&micro;&Auml;&Ntilde;&Otilde;&Eacute;&laquo;&Ouml;&micro;
u16 LCD_BGR2RGB(u16 c)
{
u16  r,g,b,rgb;   
b=(c>>0)&0x1f;
g=(c>>5)&0x3f;
r=(c>>11)&0x1f;  
rgb=(b<<11)+(g<<5)+(r<<0);   
return(rgb);
}
//&micro;±mdk -O1&Ecirc;±&frac14;&auml;&Oacute;&Aring;&raquo;&macr;&Ecirc;±&ETH;è&Ograve;&ordf;&Eacute;è&Ouml;&Atilde;
//&Ntilde;&Oacute;&Ecirc;±i
void opt_delay(u8 i)
{
while(i--);
}
//&para;&Aacute;&Egrave;&iexcl;&cedil;&ouml;&Auml;&sup3;&micro;&atilde;&micro;&Auml;&Ntilde;&Otilde;&Eacute;&laquo;&Ouml;&micro;  
//x,y:×&oslash;±ê
//·&micro;&raquo;&Oslash;&Ouml;&micro;:&acute;&Euml;&micro;&atilde;&micro;&Auml;&Ntilde;&Otilde;&Eacute;&laquo;
u16 LCD_ReadPoint(u16 x,u16 y)
{
  u16 r=0,g=0,b=0;
if(x>=lcddev.width||y>=lcddev.height)return 0; //&sup3;&not;&sup1;&yacute;&Aacute;&Euml;·&para;&Icirc;§,&Ouml;±&frac12;&Oacute;·&micro;&raquo;&Oslash;     
LCD_SetCursor(x,y);     
if(lcddev.id==0X9341||lcddev.id==0X1529||lcddev.id==0X9342||lcddev.id==0X9338||lcddev.id==0X6804||lcddev.id==0X8009||lcddev.id==0X9486||lcddev.id==0X9481||lcddev.id==0X9487||lcddev.id==0X1581||lcddev.id==0X9327)LCD_WR_REG(0X2E);//9341/6804 ·&cent;&Euml;&Iacute;&para;&Aacute;GRAM&Ouml;&cedil;&Aacute;&icirc;
else LCD_WR_REG(R34);             //&AElig;&auml;&Euml;&ucirc;IC·&cent;&Euml;&Iacute;&para;&Aacute;GRAM&Ouml;&cedil;&Aacute;&icirc;
  if(lcddev.id==0X9320)opt_delay(2);    //FOR 9320,&Ntilde;&Oacute;&Ecirc;±2us     
if(LCD->LCD_RAM)r=0;       //dummy Read   
opt_delay(2);   
  r=LCD->LCD_RAM;            //&Ecirc;&micro;&frac14;&Ecirc;×&oslash;±ê&Ntilde;&Otilde;&Eacute;&laquo;
  if(lcddev.id==0X9341||lcddev.id==0X9342||lcddev.id==0X9338)//9341&Ograve;&ordf;·&Ouml;2&acute;&Icirc;&para;&Aacute;&sup3;&ouml;
  {
  opt_delay(2);   
  b=LCD->LCD_RAM;
  g=r&0XFF;//&para;&Ocirc;&Oacute;&Uacute;9341,&micro;&Uacute;&Ograve;&raquo;&acute;&Icirc;&para;&Aacute;&Egrave;&iexcl;&micro;&Auml;&Ecirc;&Ccedil;RG&micro;&Auml;&Ouml;&micro;,R&Ocirc;&Uacute;&Ccedil;°,G&Ocirc;&Uacute;&ordm;ó,&cedil;÷&Otilde;&frac14;8&Icirc;&raquo;
  g<<=8;
}else if(lcddev.id==0X6804||lcddev.id==0X8357||lcddev.id==0X9486||lcddev.id==0X1529||lcddev.id==0X9481||lcddev.id==0X9487||lcddev.id==0X1581)r=LCD->LCD_RAM;//6804&micro;&Uacute;&para;&thorn;&acute;&Icirc;&para;&Aacute;&Egrave;&iexcl;&micro;&Auml;&sup2;&Aring;&Ecirc;&Ccedil;&Otilde;&aelig;&Ecirc;&micro;&Ouml;&micro;
if(lcddev.id==0X9325||lcddev.id==0X4535||lcddev.id==0X4531||lcddev.id==0X8989||lcddev.id==0XB505)return r;//&Otilde;&acirc;&frac14;&cedil;&Ouml;&Ouml;IC&Ouml;±&frac12;&Oacute;·&micro;&raquo;&Oslash;&Ntilde;&Otilde;&Eacute;&laquo;&Ouml;&micro;
else if(lcddev.id==0X9341||lcddev.id==0X9342||lcddev.id==0X9338)return (((r>>11)<<11)|((g>>10)<<5)|(b>>11)); //ILI9341&ETH;è&Ograve;&ordf;&sup1;&laquo;&Ecirc;&frac12;×&ordf;&raquo;&raquo;&Ograve;&raquo;&Iuml;&Acirc;
else return LCD_BGR2RGB(r);            //&AElig;&auml;&Euml;&ucirc;IC
}
//LCD&iquest;&ordf;&AElig;&ocirc;&Iuml;&Ocirc;&Ecirc;&frac34;
void LCD_DisplayOn(void)
{        
LCD_WR_REG(0X2900); //&iquest;&ordf;&AElig;&ocirc;&Iuml;&Ocirc;&Ecirc;&frac34;//&iquest;&ordf;&AElig;&ocirc;&Iuml;&Ocirc;&Ecirc;&frac34;
}  
//LCD&sup1;&Oslash;±&Otilde;&Iuml;&Ocirc;&Ecirc;&frac34;
void LCD_DisplayOff(void)
{   
LCD_WR_REG(0X2800); //&sup1;&Oslash;±&Otilde;&Iuml;&Ocirc;&Ecirc;&frac34;//&sup1;&Oslash;±&Otilde;&Iuml;&Ocirc;&Ecirc;&frac34;
}

//&Eacute;è&Ouml;&Atilde;&sup1;&acirc;±ê&Icirc;&raquo;&Ouml;&Atilde;
//Xpos:&ordm;á×&oslash;±ê
//Ypos:×&Yacute;×&oslash;±ê
void LCD_SetCursor(u16 Xpos, u16 Ypos)
{      
LCD_WR_REG(lcddev.setxcmd);
LCD_WR_DATA(Xpos>>8);
LCD_WR_REG(lcddev.setxcmd+1);
LCD_WR_DATA(Xpos&0XFF);  
LCD_WR_REG(lcddev.setycmd);
LCD_WR_DATA(Ypos>>8);
LCD_WR_REG(lcddev.setycmd+1);
LCD_WR_DATA(Ypos&0XFF);  
}  
void Set_windows(u16 xs,u16 xe,u16 ys,u16 ye)
{
LCD_WR_REG(lcddev.setxcmd);
LCD_WR_DATA(xs>>8);
LCD_WR_REG(lcddev.setxcmd+1);
LCD_WR_DATA(xs&0x00ff);
LCD_WR_REG(lcddev.setxcmd+2);
LCD_WR_DATA(xe>>8);
LCD_WR_REG(lcddev.setxcmd+3);
LCD_WR_DATA(xe&0x00ff);
LCD_WR_REG(lcddev.setycmd);
LCD_WR_DATA(ys>>8);
LCD_WR_REG(lcddev.setycmd+1);
LCD_WR_DATA(ys&0x00ff);
LCD_WR_REG(lcddev.setycmd+2);
LCD_WR_DATA(ye>>8);
LCD_WR_REG(lcddev.setycmd+3);
LCD_WR_DATA(ye&0x00ff);
}
//&Eacute;è&Ouml;&Atilde;LCD&micro;&Auml;×&Ocirc;&para;&macr;&Eacute;¨&Atilde;è·&frac12;&Iuml;ò
//×&cent;&Ograve;&acirc;:&AElig;&auml;&Euml;&ucirc;&ordm;&macr;&Ecirc;&yacute;&iquest;&Eacute;&Auml;&Uuml;&raquo;á&Ecirc;&Uuml;&micro;&frac12;&acute;&Euml;&ordm;&macr;&Ecirc;&yacute;&Eacute;è&Ouml;&Atilde;&micro;&Auml;&Oacute;°&Iuml;ì(&Oacute;&Egrave;&AElig;&auml;&Ecirc;&Ccedil;9341/6804&Otilde;&acirc;&Aacute;&frac12;&cedil;&ouml;&AElig;&aelig;&Yacute;&acirc;),
//&Euml;ù&Ograve;&Ocirc;,&Ograve;&raquo;°&atilde;&Eacute;è&Ouml;&Atilde;&Icirc;&ordf;L2R_U2D&frac14;&acute;&iquest;&Eacute;,&Egrave;&ccedil;&sup1;&ucirc;&Eacute;è&Ouml;&Atilde;&Icirc;&ordf;&AElig;&auml;&Euml;&ucirc;&Eacute;¨&Atilde;è·&frac12;&Ecirc;&frac12;,&iquest;&Eacute;&Auml;&Uuml;&micro;&frac14;&Ouml;&Acirc;&Iuml;&Ocirc;&Ecirc;&frac34;&sup2;&raquo;&Otilde;&yacute;&sup3;&pound;.
//dir:0~7,&acute;ú±í8&cedil;&ouml;·&frac12;&Iuml;ò(&frac34;&szlig;&Igrave;&aring;&para;¨&Ograve;&aring;&frac14;&ucirc;lcd.h)
//9320/9325/9328/4531/4535/1505/b505/8989/5408/9341&micro;&Egrave;IC&Ograve;&Ntilde;&frac34; &Ecirc;&micro;&frac14;&Ecirc;&sup2;&acirc;&Ecirc;&Ocirc;        
void LCD_Scan_Dir(u8 dir)
{
u16 regval=0;
u16 dirreg=0;
u16 temp;  

  switch(dir)
  {
   case L2R_U2D://&acute;&Oacute;×ó&micro;&frac12;&Oacute;&Ograve;,&acute;&Oacute;&Eacute;&Iuml;&micro;&frac12;&Iuml;&Acirc;
    regval|=(0<<7)|(0<<6)|(0<<5);
    break;
   case L2R_D2U://&acute;&Oacute;×ó&micro;&frac12;&Oacute;&Ograve;,&acute;&Oacute;&Iuml;&Acirc;&micro;&frac12;&Eacute;&Iuml;
    regval|=(1<<7)|(0<<6)|(0<<5);
    break;
   case R2L_U2D://&acute;&Oacute;&Oacute;&Ograve;&micro;&frac12;×ó,&acute;&Oacute;&Eacute;&Iuml;&micro;&frac12;&Iuml;&Acirc;
    regval|=(0<<7)|(1<<6)|(0<<5);
    break;
   case R2L_D2U://&acute;&Oacute;&Oacute;&Ograve;&micro;&frac12;×ó,&acute;&Oacute;&Iuml;&Acirc;&micro;&frac12;&Eacute;&Iuml;
    regval|=(1<<7)|(1<<6)|(0<<5);
    break;  
   case U2D_L2R://&acute;&Oacute;&Eacute;&Iuml;&micro;&frac12;&Iuml;&Acirc;,&acute;&Oacute;×ó&micro;&frac12;&Oacute;&Ograve;
    regval|=(0<<7)|(0<<6)|(1<<5);
    break;
   case U2D_R2L://&acute;&Oacute;&Eacute;&Iuml;&micro;&frac12;&Iuml;&Acirc;,&acute;&Oacute;&Oacute;&Ograve;&micro;&frac12;×ó
    regval|=(0<<7)|(1<<6)|(1<<5);
    break;
   case D2U_L2R://&acute;&Oacute;&Iuml;&Acirc;&micro;&frac12;&Eacute;&Iuml;,&acute;&Oacute;×ó&micro;&frac12;&Oacute;&Ograve;
    regval|=(1<<7)|(0<<6)|(1<<5);
    break;
   case D2U_R2L://&acute;&Oacute;&Iuml;&Acirc;&micro;&frac12;&Eacute;&Iuml;,&acute;&Oacute;&Oacute;&Ograve;&micro;&frac12;×ó
    regval|=(1<<7)|(1<<6)|(1<<5);
    break;  
  }
  dirreg=0X3A00;
   //regval|=0X08;//BGR      
  LCD_WriteReg(dirreg,regval);
   if((regval&0X20)||lcddev.dir==1)
  {
   if(lcddev.width<lcddev.height)//&frac12;&raquo;&raquo;&raquo;X,Y
   {
    temp=lcddev.width;
    lcddev.width=lcddev.height;
    lcddev.height=temp;
    }
  }else  
  {
   if(lcddev.width>lcddev.height)//&frac12;&raquo;&raquo;&raquo;X,Y
   {
    temp=lcddev.width;
    lcddev.width=lcddev.height;
    lcddev.height=temp;
    }
  }  
  LCD_WR_REG(lcddev.setxcmd);  
  LCD_WR_DATA(0);
  LCD_WR_REG(lcddev.setxcmd+1);
  LCD_WR_DATA(0);
  LCD_WR_REG(lcddev.setxcmd+2);
  LCD_WR_DATA((lcddev.width-1)>>8);
  LCD_WR_REG(lcddev.setxcmd+3);
  LCD_WR_DATA((lcddev.width-1)&0XFF);
  LCD_WR_REG(lcddev.setycmd);
  LCD_WR_DATA(0);
  LCD_WR_REG(lcddev.setycmd+1);
  LCD_WR_DATA(0);
  LCD_WR_REG(lcddev.setycmd+2);
  LCD_WR_DATA((lcddev.height-1)>>8);
  LCD_WR_REG(lcddev.setycmd+3);
  LCD_WR_DATA((lcddev.height-1)&0XFF);  
}  

//&raquo; &micro;&atilde;
//x,y:×&oslash;±ê
//POINT_COLOR:&acute;&Euml;&micro;&atilde;&micro;&Auml;&Ntilde;&Otilde;&Eacute;&laquo;
void LCD_DrawPoint(u16 x,u16 y)
{
Set_windows(x,x+1,y,y+1);//LCD_SetCursor(x,y);  //&Eacute;è&Ouml;&Atilde;&sup1;&acirc;±ê&Icirc;&raquo;&Ouml;&Atilde;
LCD_WriteRAM_Prepare(); //&iquest;&ordf;&Ecirc;&frac14;&ETH;&acute;&Egrave;&euml;GRAM
LCD->LCD_RAM=POINT_COLOR;
}
//&iquest;ì&Euml;&Ugrave;&raquo; &micro;&atilde;
//x,y:×&oslash;±ê
//color:&Ntilde;&Otilde;&Eacute;&laquo;
void LCD_Fast_DrawPoint(u16 x,u16 y,u16 color)
{   
  LCD_WR_REG(lcddev.setxcmd);
  LCD_WR_DATA(x>>8);
  LCD_WR_DATA(x&0XFF);
  LCD_WR_DATA((lcddev.width-1)>>8);
  LCD_WR_DATA((lcddev.width-1)&0XFF);
  
  LCD_WR_REG(lcddev.setycmd);
  LCD_WR_DATA(y>>8);
  LCD_WR_DATA(y&0XFF);
  LCD_WR_DATA((lcddev.height-1)>>8);
  LCD_WR_DATA((lcddev.height-1)&0XFF);
   
  LCD->LCD_REG=lcddev.wramcmd;
  LCD->LCD_RAM=color;
}  

//&Eacute;è&Ouml;&Atilde;LCD&Iuml;&Ocirc;&Ecirc;&frac34;·&frac12;&Iuml;ò
//dir:0,&Ecirc;ú&AElig;&Aacute;&pound;&raquo;1,&ordm;á&AElig;&Aacute;
void LCD_Display_Dir(u8 dir)
{
if(dir==0)//&Ecirc;ú&AElig;&Aacute;
{
  lcddev.dir=0;//&Ecirc;ú&AElig;&Aacute;
  lcddev.wramcmd=0X2C00;
   lcddev.setxcmd=0X2A00;
  lcddev.setycmd=0X2B00;   
  lcddev.width=480;
  lcddev.height=854;   
}else     //&ordm;á&AElig;&Aacute;
{      
  lcddev.dir=1; //&ordm;á&AElig;&Aacute;
  lcddev.wramcmd=0X2C00;
   lcddev.setxcmd=0X2A00;
  lcddev.setycmd=0X2B00;  
  lcddev.width=854;
  lcddev.height=480;      
}
LCD_Scan_Dir(DFT_SCAN_DIR); //&Auml;&not;&Egrave;&Iuml;&Eacute;¨&Atilde;è·&frac12;&Iuml;ò
}  
//&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;lcd
//&cedil;&Atilde;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;&ordm;&macr;&Ecirc;&yacute;&iquest;&Eacute;&Ograve;&Ocirc;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;&cedil;÷&Ouml;&Ouml;ILI93XX&Ograve;&ordm;&frac34;§,&micro;&laquo;&Ecirc;&Ccedil;&AElig;&auml;&Euml;&ucirc;&ordm;&macr;&Ecirc;&yacute;&Ecirc;&Ccedil;&raquo;ù&Oacute;&Uacute;ILI9320&micro;&Auml;!!!
//&Ocirc;&Uacute;&AElig;&auml;&Euml;&ucirc;&ETH;&Iacute;&ordm;&Aring;&micro;&Auml;&Ccedil;&yacute;&para;&macr;&ETH;&frac34;&AElig;&not;&Eacute;&Iuml;&Atilde;&raquo;&Oacute;&ETH;&sup2;&acirc;&Ecirc;&Ocirc;!
void LCD_Init(void)
{            
GPIO_InitTypeDef GPIO_InitStructure;
FSMC_NORSRAMInitTypeDef  FSMC_NORSRAMInitStructure;
  FSMC_NORSRAMTimingInitTypeDef  readWriteTiming;
FSMC_NORSRAMTimingInitTypeDef  writeTiming;
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC,ENABLE); //&Ecirc;&sup1;&Auml;&Uuml;FSMC&Ecirc;±&Ouml;&Oacute;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOD|RCC_APB2Periph_GPIOE|RCC_APB2Periph_GPIOG|RCC_APB2Periph_AFIO,ENABLE);//&Ecirc;&sup1;&Auml;&UumlORTB,D,E,G&Ograve;&Ocirc;&frac14;°AFIO&cedil;&acute;&Oacute;&Atilde;&sup1;&brvbar;&Auml;&Uuml;&Ecirc;±&Ouml;&Oacute;
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;     //PB0 &Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml; ±&sup3;&sup1;&acirc;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;    //&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOB, &GPIO_InitStructure);
  //PORTD&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;  
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10|GPIO_Pin_14|GPIO_Pin_15;     // //PORTD&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;  
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;    //&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;   
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOD, &GPIO_InitStructure);
   
//PORTE&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;  
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10|GPIO_Pin_11|GPIO_Pin_12|GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_15;     // //PORTD&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;  
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;    //&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;   
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOE, &GPIO_InitStructure);
   
    // //PORTG12&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml; A0
//GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_12;  // //PORTD&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;  
  //GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;    //&cedil;&acute;&Oacute;&Atilde;&Iacute;&AElig;&Iacute;ì&Ecirc;&auml;&sup3;&ouml;   
  //GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  //GPIO_Init(GPIOG, &GPIO_InitStructure);

   readWriteTiming.FSMC_AddressSetupTime = 0x05;  //&micro;&Oslash;&Ouml;·&frac12;¨&Aacute;&cent;&Ecirc;±&frac14;&auml;&pound;¨ADDSET&pound;&copy;&Icirc;&ordf;2&cedil;&ouml;HCLK 1/36M=27ns
    readWriteTiming.FSMC_AddressHoldTime = 0x00;  //&micro;&Oslash;&Ouml;·±&pound;&sup3;&Ouml;&Ecirc;±&frac14;&auml;&pound;¨ADDHLD&pound;&copy;&Auml;&pound;&Ecirc;&frac12;A&Icirc;&acute;&Oacute;&Atilde;&micro;&frac12;
    readWriteTiming.FSMC_DataSetupTime = 0x09;   // &Ecirc;&yacute;&frac34;&Yacute;±&pound;&acute;&aelig;&Ecirc;±&frac14;&auml;&Icirc;&ordf;16&cedil;&ouml;HCLK,&Ograve;ò&Icirc;&ordf;&Ograve;&ordm;&frac34;§&Ccedil;&yacute;&para;&macr;IC&micro;&Auml;&para;&Aacute;&Ecirc;&yacute;&frac34;&Yacute;&micro;&Auml;&Ecirc;±&ordm;ò&pound;&not;&Euml;&Ugrave;&para;&Egrave;&sup2;&raquo;&Auml;&Uuml;&Igrave;&laquo;&iquest;ì&pound;&not;&Oacute;&Egrave;&AElig;&auml;&para;&Ocirc;1289&Otilde;&acirc;&cedil;&ouml;IC&iexcl;&pound;
    readWriteTiming.FSMC_BusTurnAroundDuration = 0x00;
    readWriteTiming.FSMC_CLKDivision = 0x00;
    readWriteTiming.FSMC_DataLatency = 0x00;
    readWriteTiming.FSMC_AccessMode = FSMC_AccessMode_A;  //&Auml;&pound;&Ecirc;&frac12;A
   
   writeTiming.FSMC_AddressSetupTime = 0X1f;  //&micro;&Oslash;&Ouml;·&frac12;¨&Aacute;&cent;&Ecirc;±&frac14;&auml;&pound;¨ADDSET&pound;&copy;&Icirc;&ordf;1&cedil;&ouml;HCLK  
    writeTiming.FSMC_AddressHoldTime = 0X00;  //&micro;&Oslash;&Ouml;·±&pound;&sup3;&Ouml;&Ecirc;±&frac14;&auml;&pound;¨A  
    writeTiming.FSMC_DataSetupTime = 0X1f;   ////&Ecirc;&yacute;&frac34;&Yacute;±&pound;&acute;&aelig;&Ecirc;±&frac14;&auml;&Icirc;&ordf;4&cedil;&ouml;HCLK
    writeTiming.FSMC_BusTurnAroundDuration = 0x00;
    writeTiming.FSMC_CLKDivision = 0x00;
    writeTiming.FSMC_DataLatency = 0x00;
    writeTiming.FSMC_AccessMode = FSMC_AccessMode_A;  //&Auml;&pound;&Ecirc;&frac12;A

    FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1;//  &Otilde;&acirc;&Agrave;&iuml;&Icirc;&Ograve;&Atilde;&Ccedil;&Ecirc;&sup1;&Oacute;&Atilde;NE4 &pound;&not;&Ograve;&sup2;&frac34;&Iacute;&para;&Ocirc;&Oacute;&brvbar;BTCR[6],[7]&iexcl;&pound;
    FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; // &sup2;&raquo;&cedil;&acute;&Oacute;&Atilde;&Ecirc;&yacute;&frac34;&Yacute;&micro;&Oslash;&Ouml;·
    FSMC_NORSRAMInitStructure.FSMC_MemoryType =FSMC_MemoryType_SRAM;// FSMC_MemoryType_SRAM;  //SRAM   
    FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;//&acute;&aelig;&acute;&cent;&AElig;÷&Ecirc;&yacute;&frac34;&Yacute;&iquest;í&para;&Egrave;&Icirc;&ordf;16bit   
    FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode =FSMC_BurstAccessMode_Disable;// FSMC_BurstAccessMode_Disable;
    FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
   FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait=FSMC_AsynchronousWait_Disable;
    FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;   
    FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;  
    FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; //  &acute;&aelig;&acute;&cent;&AElig;÷&ETH;&acute;&Ecirc;&sup1;&Auml;&Uuml;
    FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;   
    FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable; // &para;&Aacute;&ETH;&acute;&Ecirc;&sup1;&Oacute;&Atilde;&sup2;&raquo;&Iacute;&not;&micro;&Auml;&Ecirc;±&ETH;ò
    FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
    FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &readWriteTiming; //&para;&Aacute;&ETH;&acute;&Ecirc;±&ETH;ò
    FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &writeTiming;  //&ETH;&acute;&Ecirc;±&ETH;ò
    FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);  //&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;FSMC&Aring;&auml;&Ouml;&Atilde;
    FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE);  // &Ecirc;&sup1;&Auml;&Uuml;BANK1
   
  delay_ms(50); // delay 50 ms
  
//OTM8009A_for_HSD5'_InitialCode_20120426.txt 480x854
LCD_WR_REG(0xff00);  //
LCD_WR_DATA(0x80);
LCD_WR_REG(0xff01);  // enable EXTC
LCD_WR_DATA(0x09);
LCD_WR_REG(0xff02);  //
LCD_WR_DATA(0x01);
  
LCD_WR_REG(0xff80);  // enable Orise mode
LCD_WR_DATA(0x80);
LCD_WR_REG(0xff81); //
LCD_WR_DATA(0x09);
   
LCD_WR_REG(0xff03);  // enable SPI+I2C cmd2 read
LCD_WR_DATA(0x01);
  
//gamma DC                                                                       
LCD_WR_REG(0xc0b4); //1+2dot inversion
LCD_WR_DATA(0x10);

LCD_WR_REG(0xC582); //REG-pump23                                
LCD_WR_DATA(0xA3);                                                

LCD_WR_REG(0xC590);  //Pump setting (3x=D6) (2x=96)//04/30
LCD_WR_DATA(0x96);      //2x   

LCD_WR_REG(0xC591);  //Pump setting(VGH/VGL)                    
LCD_WR_DATA(0x76);      //8F +15.5 / -15.5      //04/30                                    
  
LCD_WR_REG(0xD800); //GVDD=4.5V                                    
LCD_WR_DATA(0x70);     //C0404 +4.8 =                                                
LCD_WR_REG(0xD801);  //NGVDD=4.5V                              
LCD_WR_DATA(0x75);   

//VCOMDC                                                                 
LCD_WR_REG(0xd900);  // VCOMDC=                                 
//LCD_WR_DATA(0x49);     //61->5F  0620/49
   LCD_WR_DATA(0x45);     //0730 New LC C0404

//Gamma Setting                                             
//Gamma_W16P(0xE1,9,10,14,14,8,27,14,15,0,4,2,5,13,40,36,15); //2.2+ c0405 HSD     
//Gamma_W16P(0xE2,9,10,14,14,8,27,14,15,0,4,2,5,13,40,36,15); //2.2- c0405 HSD  
LCD_WR_REG(0xC181); //Frame rate 65Hz//V02
LCD_WR_DATA(0x66); //8018 default = 60hz
  // RGB I/F setting VSYNC for OTM8018 0x0e
LCD_WR_REG(0xC1a1); //external Vsync(08)  /Vsync,Hsync(0c) /Vsync,Hsync,DE(0e) //V02(0e)  / all  included clk(0f)
LCD_WR_DATA(0x0e);
    //-----------------------------------------------  
LCD_WR_REG(0xC489); //pre-charge Enable
LCD_WR_DATA(0x08); //04/30 08->00 P-CH ON
LCD_WR_REG(0xC0a2); //pre-charge //PULL-LOW 04/30
LCD_WR_DATA(0x04);
LCD_WR_REG(0xC0a3); //pre-charge //P-CH 04/30
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC0a4); //pre-charge //P-CH 04/30
LCD_WR_DATA(0x02);
LCD_WR_REG(0xC480); //Proch Source Output level
LCD_WR_DATA(0x30);


//------For OTM8018  ---------
LCD_WR_REG(0xC1A6); //Display On Pump
LCD_WR_DATA(0x01);
LCD_WR_REG(0xC5C0); //
LCD_WR_DATA(0x00);
LCD_WR_REG(0xB08B); //
LCD_WR_DATA(0x40);
LCD_WR_REG(0xF5B2); //VRGH Disable
LCD_WR_DATA(0x15);
LCD_WR_REG(0xF5B3); //
LCD_WR_DATA(0x00);
LCD_WR_REG(0xF5B4); //
LCD_WR_DATA(0x15);
LCD_WR_REG(0xF5B5); //
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC593); //VRGH minimum,
LCD_WR_DATA(0x03);
//------For OTM8018  ---------
//-----------------------------------------------
LCD_WR_REG(0xC481); //source bias //V02
LCD_WR_DATA(0x83);
LCD_WR_REG(0xC592); //Pump45
LCD_WR_DATA(0x01);//(01)
LCD_WR_REG(0xC5B1);  //DC voltage setting ;[0]GVDD output, default: 0xa8
LCD_WR_DATA(0xA9);
//--------------------854x480---------------------------------  
LCD_WR_REG(0xb392); // Enable SW_GM
LCD_WR_DATA(0x45);
LCD_WR_REG(0xb390); // SW_GM 480X854
LCD_WR_DATA(0x02);

LCD_WR_REG(0xC080); //RTN
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC081); //RTN
LCD_WR_DATA(0x58);
LCD_WR_REG(0xC082); //RTN
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC083); //RTN
LCD_WR_DATA(0x14);
LCD_WR_REG(0xC084); //RTN
LCD_WR_DATA(0x16);
//--------------------854x480---------------------------------
///============================================================================
///============================================================================
//--------------------------------------------------------------------------------
//  initial setting 2 < tcon_goa_wave >  480x854
//--------------------------------------------------------------------------------
// C09x : mck_shift1/mck_shift2/mck_shift3
LCD_WR_REG(0xC090); // c091[7:0] : mck_shift1_hi[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC091); // c092[7:0] : mck_shift1_lo[7:0]
LCD_WR_DATA(0x56);  //
LCD_WR_REG(0xC092); // c093[7:0] : mck_shift2_hi[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC093); // c094[7:0] : mck_shift2_lo[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC094); // c095[7:0] : mck_shift3_hi[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC095); // c096[7:0] : mck_shift3_lo[7:0]
LCD_WR_DATA(0x03);                                                                                                                       
// C1Ax : hs_shift/vs_shift
LCD_WR_REG(0xC1a6); // c1a6[7:0] : hs_shift[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC1a7); // c1a7[7:0] : vs_shift_hi[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC1a8); // c1a8[7:0] : vs_shift_lo[7:0]
LCD_WR_DATA(0x00);

//--------------------------------------------------------------------------------
//  initial setting 2 < tcon_goa_wave >
//--------------------------------------------------------------------------------
// CE8x : vst1, vst2, vst3, vst4
LCD_WR_REG(0xCE80); // ce81[7:0] : vst1_shift[7:0]
LCD_WR_DATA(0x87);
LCD_WR_REG(0xCE81); // ce82[7:0] : 0000, vst1_width[3:0]
LCD_WR_DATA(0x03);
LCD_WR_REG(0xCE82); // ce83[7:0] : vst1_tchop[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCE83); // ce84[7:0] : vst2_shift[7:0]
LCD_WR_DATA(0x85);
LCD_WR_REG(0xCE84); // ce85[7:0] : 0000, vst2_width[3:0]
LCD_WR_DATA(0x03);
LCD_WR_REG(0xCE85); // ce86[7:0] : vst2_tchop[7:0]
LCD_WR_DATA(0x00);                                                                                                                       
LCD_WR_REG(0xCE86); // ce87[7:0] : vst3_shift[7:0]                                                                                       
LCD_WR_DATA(0x86);                                                                                                                       
LCD_WR_REG(0xCE87); // ce88[7:0] : 0000, vst3_width[3:0]                                                                              
LCD_WR_DATA(0x03);                                                                                                                       
LCD_WR_REG(0xCE88); // ce89[7:0] : vst3_tchop[7:0]                                                                                       
LCD_WR_DATA(0x00);                                                                                                                       
LCD_WR_REG(0xCE89); // ce8a[7:0] : vst4_shift[7:0]                                                                                       
LCD_WR_DATA(0x84);
LCD_WR_REG(0xCE8a); // ce8b[7:0] : 0000, vst4_width[3:0]
LCD_WR_DATA(0x03);
LCD_WR_REG(0xCE8b); // ce8c[7:0] : vst4_tchop[7:0]
LCD_WR_DATA(0x00);
//CEAx : clka1, clka2
LCD_WR_REG(0xCEa0); // cea1[7:0] : clka1_width[3:0], clka1_shift[11:8]
LCD_WR_DATA(0x38);
LCD_WR_REG(0xCEa1); // cea2[7:0] : clka1_shift[7:0]
LCD_WR_DATA(0x03);
LCD_WR_REG(0xCEa2); // cea3[7:0] : clka1_sw_tg, odd_high, flat_head, flat_tail, switch[11:8]
LCD_WR_DATA(0x03);
LCD_WR_REG(0xCEa3); // cea4[7:0] : clka1_switch[7:0]
LCD_WR_DATA(0x58);
LCD_WR_REG(0xCEa4); // cea5[7:0] : clka1_extend[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCEa5); // cea6[7:0] : clka1_tchop[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCEa6); // cea7[7:0] : clka1_tglue[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCEa7); // cea8[7:0] : clka2_width[3:0], clka2_shift[11:8]
LCD_WR_DATA(0x38);
LCD_WR_REG(0xCEa8); // cea9[7:0] : clka2_shift[7:0]
LCD_WR_DATA(0x02);
LCD_WR_REG(0xCEa9); // ceaa[7:0] : clka2_sw_tg, odd_high, flat_head, flat_tail, switch[11:8]
LCD_WR_DATA(0x03);
LCD_WR_REG(0xCEaa); // ceab[7:0] : clka2_switch[7:0]
LCD_WR_DATA(0x59);
LCD_WR_REG(0xCEab); // ceac[7:0] : clka2_extend
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCEac); // cead[7:0] : clka2_tchop
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCEad); // ceae[7:0] : clka2_tglue
LCD_WR_DATA(0x00);
//CEBx : clka3, clka4
LCD_WR_REG(0xCEb0); // ceb1[7:0] : clka3_width[3:0], clka3_shift[11:8]
LCD_WR_DATA(0x38);
LCD_WR_REG(0xCEb1); // ceb2[7:0] : clka3_shift[7:0]
LCD_WR_DATA(0x01);
LCD_WR_REG(0xCEb2); // ceb3[7:0] : clka3_sw_tg, odd_high, flat_head, flat_tail, switch[11:8]
LCD_WR_DATA(0x03);
LCD_WR_REG(0xCEb3); // ceb4[7:0] : clka3_switch[7:0]
LCD_WR_DATA(0x5a);
LCD_WR_REG(0xCEb4); // ceb5[7:0] : clka3_extend[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCEb5); // ceb6[7:0] : clka3_tchop[7:0]
LCD_WR_DATA(0x00);
LCD_WR_REG(0xCEb6); // ceb7[7:0] : cl
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。