📄 hw_er61509.c
字号:
/******************************************************************/
/* Copyright (C) 2007 ROCK-CHIPS FUZHOU . All Rights Reserved. */
/*******************************************************************
File : hw_Er61509.c
Desc : Mcupanel型号的Mcu驱动
Author : nzy
Date :
Notes :
$Log :
*********************************************************************/
#include "hw_include.h"
#if(LCDPANEL == MCUIF_ER61509)
/*---------------------------------------------------------
Name : Mcupanel_PowerOnInit
Desc : 初始化Mcu panel
Return: 状态
Author: LingZJ
Date : 070630
-----------------------------------------------------------*/
void Mcupanel_PowerOnInit(void)
{
int i,j;
Mcupanel_RegSet(0x0600,0x0001);//soft reset
delay_nops(10000);
Mcupanel_RegSet(0x0600,0x0000);//soft reset
delay_nops(10000);
Mcupanel_RegSet(0x0606,0x0000);//i80-i/F Endian Control
//===User setting===
Mcupanel_RegSet(0x0001,0x0000);//Driver Output Control
Mcupanel_RegSet(0x0002,0x0100);//LCD Driving Wave Control
// Mcupanel_RegSet(0x0006,0x0000);//Outline Sharpening Control
Mcupanel_RegSet(0x0003,0x1038);//Entry Mode
Mcupanel_RegSet(0x0008,0x0808);//Sets the number of lines for front/back porch period
Mcupanel_RegSet(0x0009,0x0001);//Display Control 3
Mcupanel_RegSet(0x000B,0x0010);//Low Power Control
Mcupanel_RegSet(0x000C,0x0000);//External Display Interface Control 1
Mcupanel_RegSet(0x000F,0x0000);//External Display Interface Control 2
Mcupanel_RegSet(0x0400,0x3100);//Base Image Number of Line
Mcupanel_RegSet(0x0401,0x0001);//Base Image Display
Mcupanel_RegSet(0x0404,0x0000);//Base Image Vertical Scroll Control
Mcupanel_RegSet(0x0500,0x0000);//Partial Image 1: Display Position
Mcupanel_RegSet(0x0501,0x0000);//RAM Address (Start Line Address)
Mcupanel_RegSet(0x0502,0x018f);//RAM Address (End Line Address)
Mcupanel_RegSet(0x0503,0x0000);//Partial Image 2: Display Position RAM Address
Mcupanel_RegSet(0x0504,0x0000);//RAM Address (Start Line Address)
Mcupanel_RegSet(0x0505,0x0000);//RAM Address (End Line Address)
//Panel interface control===
Mcupanel_RegSet(0x0010,0x0013);//Division Ratio,Clocks per Line 14
delay_nops(10000);
Mcupanel_RegSet(0x0011,0x0202);//Division Ratio,Clocks per Line
Mcupanel_RegSet(0x0012,0x0300);//Sets low power VCOM drive period.
delay_nops(10000);
Mcupanel_RegSet(0x0020,0x021e);//Panel Interface Control 4
Mcupanel_RegSet(0x0021,0x0202);//Panel Interface Control 5
Mcupanel_RegSet(0x0022,0x0100);//Panel Interface Control 6
Mcupanel_RegSet(0x0090,0x0000);//Frame Marker Control
Mcupanel_RegSet(0x0092,0x0000);//MDDI Sub-display Control
//===Gamma setting===
Mcupanel_RegSet(0x0300,0x0700);//γ Control
Mcupanel_RegSet(0x0301,0x0007);//γ Control
Mcupanel_RegSet(0x0302,0x0304);//γ Control
Mcupanel_RegSet(0x0303,0x0300);//γ Control
Mcupanel_RegSet(0x0304,0x0102);//γ Control
Mcupanel_RegSet(0x0305,0x0707);//γ Control
Mcupanel_RegSet(0x0306,0x1f1f);//γ Control
Mcupanel_RegSet(0x0307,0x0707);//γ Control
Mcupanel_RegSet(0x0308,0x0004);//γ Control
Mcupanel_RegSet(0x0309,0x0700);//γ Control
Mcupanel_RegSet(0x030A,0x0300);//γ Control
Mcupanel_RegSet(0x030B,0x0300);//γ Control
Mcupanel_RegSet(0x030C,0x0407);//γ Control
Mcupanel_RegSet(0x030D,0x101f);//γ Control
//===Power on sequence===
Mcupanel_RegSet(0x0007,0x0001);//Display Control 1
Mcupanel_RegSet(0x0110,0x0001);//Power supply startup enable bit
Mcupanel_RegSet(0x0112,0x0060);//Power Control 7
delay_nops(50000);
Mcupanel_RegSet(0x0100,0x13B0);//Power Control 1
delay_nops(10000);
Mcupanel_RegSet(0x0101,0x0007);//Power Control 2
delay_nops(10000);
Mcupanel_RegSet(0x0102,0x0119);//Starts VLOUT3,Sets the VREG1OUT.
delay_nops(10000);
Mcupanel_RegSet(0x0103,0x0900);//set the amplitude of VCOM
delay_nops(50000);
Mcupanel_RegSet(0x0282,0x0000);//VCOMH voltage
delay_nops(10000);
Mcupanel_RegSet(0x0281,0x0000);//Selects the factor of VREG1OUT to generate VCOMH.
Mcupanel_RegSet(0x0102,0x01ba);//Starts VLOUT3,Sets the VREG1OUT.
delay_nops(10000);
//Address
Mcupanel_RegSet(0x0210,0x0000);//Window Horizontal RAM Address Start
Mcupanel_RegSet(0x0211,0x00ef);//Window Horizontal RAM Address End
Mcupanel_RegSet(0x0212,0x0000);//Window Vertical RAM Address Start
Mcupanel_RegSet(0x0213,0x018f);//Window Vertical RAM Address End
Mcupanel_RegSet(0x0200,0x0000);//RAM Address Set (Horizontal Address)
Mcupanel_RegSet(0x0201,0x0000);//RAM Address Set (Vertical Address)
//===Display_On_Function===
Mcupanel_RegSet(0x0007,0x0021);//Display Control 1
delay_nops(40000);
Mcupanel_RegSet(0x0007,0x0061);//Display Control 1
delay_nops(100000);
Mcupanel_RegSet(0x0007,0x0173);//Display Control 1
delay_nops(300000);
Mcupanel_Command(0x0202); //Write Data to GRAM
#if 0
for(j=0;j<240;j++)
for(i=0;i<320;i++)
Mcupanel_Data(0x0000ff);
#endif
}
/*---------------------------------------------------------
Name : Mcupanel_Standby
Desc :
Return:
Author: nzy
Date :
-----------------------------------------------------------*/
void Mcupanel_Standby(BOOLEAN Enable)
{
if(Enable == STANDBY)//Standby mode
{
}
else//Return normal
{
}
}
/*---------------------------------------------------------
Name : Mcupanel_SetAddr
Desc : 设置Mcu起始地址
Return:
Author: nzy
Date :
-----------------------------------------------------------*/
void Mcupanel_SetAddr(UINT32 x, UINT32 y)
{
}
/*---------------------------------------------------------
Name : Mcupanel_SetWindow
Desc : 设置Mcu局部窗口
Return: 状态
Author: nzy
Date :
-----------------------------------------------------------*/
void Mcupanel_SetWindow(UHRECT *area)
{
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -