📄 elcd.h
字号:
//*************************ELCD_DATARX_REG*******************************************************************
// ELCD.H *
// author: zhangxuguang *
// rev : 1.0 *
// date : 2005/9/13 *
// File description: define the Elcd module address and variable value. *
//********************************************************************************************
#ifndef ELCD_H
#define ELCD_H
#define ELCD_ADD_START 0x35000800
#define ELCD_ADD_END 0x35000fff
#define ELCD_MEM_SIZE 0x07ff
#define ELCD_CONTROL_REG1 (ELCD_ADD_START+0x00) //define the ELCD MODULE CONTROL REG.
#define ELCD_ONOFFTIME_REG (ELCD_ADD_START+0x04)
#define ELCD_DMAIT_REG (ELCD_ADD_START+0x08)
#define ELCD_TE_REG (ELCD_ADD_START+0x0C)
#define ELCD_CTL_REG2 (ELCD_ADD_START+0x10)
#define ELCD_CMDTX_REG (ELCD_ADD_START+0x14)
#define ELCD_DATATX_REG (ELCD_ADD_START+0x18)
#define ELCD_COUNTERRX_REG (ELCD_ADD_START+0x1C)
#define ELCD_DATARX_REG (ELCD_ADD_START+0x20)
#define ELCD_STATUS_REG (ELCD_ADD_START+0x24)
#define ELCD_PIXELPOS_REG (ELCD_ADD_START+0x28)
#define ELCD_CYCLE1_REG1 (ELCD_ADD_START+0x2C)
#define ELCD_CYCLE1_REG2 (ELCD_ADD_START+0x30)
#define ELCD_CYCLE1_REG3 (ELCD_ADD_START+0x34)
#define ELCD_CYCLE1_REG4 (ELCD_ADD_START+0x38)
#define ELCD_CYCLE1_REG5 (ELCD_ADD_START+0x3C)
#define ELCD_CYCLE2_REG1 (ELCD_ADD_START+0x40)
#define ELCD_CYCLE2_REG2 (ELCD_ADD_START+0x44)
#define ELCD_CYCLE2_REG3 (ELCD_ADD_START+0x48)
#define ELCD_CYCLE3_REG1 (ELCD_ADD_START+0x4C)
#define ELCD_CYCLE3_REG2 (ELCD_ADD_START+0x50)
#define ELCD_REVNB_REG (ELCD_ADD_START+0x54)
#define ELCD_COUNTERTX_REG (ELCD_ADD_START+0x58)
//*************************************************************************************************************/
// following define some data structure
//*************************************************************************************************************/
#define nCs0 0
#define nCs1 1
#define MAINBUSSIZE 18
#define SUBBUSSIZE 8
//*************************************************************************************************************/
// as following define the PIN CONFIGURATE REGISTER.
//*************************************************************************************************************/
#define CONF_ELCD_DATA_0 (0xFFFE11EC )
#define CONF_ELCD_DATA_1 (0xFFFE11F0 )
#define CONF_ELCD_DATA_2 (0xFFFE11F4 )
#define CONF_ELCD_DATA_3 (0xFFFE11F8 )
#define CONF_ELCD_DATA_4 (0xFFFE11FC )
#define CONF_ELCD_DATA_5 (0xFFFE1200 )
#define CONF_ELCD_DATA_6 (0xFFFE1204 )
#define CONF_ELCD_DATA_7 (0xFFFE1208 )
#define CONF_ELCD_DATA_8 (0xfffe120c )
#define CONF_ELCD_DATA_9 (0xfffe1210 )
#define CONF_ELCD_DATA_10 (0xfffe1214 )
#define CONF_ELCD_DATA_11 (0xfffe1218 )
#define CONF_ELCD_DATA_12 (0xfffe121c )
#define CONF_ELCD_DATA_13 (0xfffe1220 )
#define CONF_ELCD_DATA_14 (0xfffe1224 )
#define CONF_ELCD_DATA_15 (0xfffe1228 )
#define CONF_ELCD_DATA_16 (0xfffe122c )
#define CONF_ELCD_DATA_17 (0xfffe1230 )
#define CONF_ELCD_NCS0 (0xfffe1234 )
#define CONF_ELCD_NRESET (0xfffe1238 )
#define CONF_ELCD_ESTRB (0xfffe123c )
#define CONF_ELCD_TE (0xfffe1240 )
#define CONF_ELCD_DNC (0xfffe1244 )
#define CONF_ELCD_RNW (0xfffe1248 )
#define CONF_GPIO_1 (0xfffe124c ) //configure for NCS1 MODE 1
#define ARM_IDLECT2 (0xfffece08 )
#define ARM_IDLECT3 (0xfffece24 )
#define ARM_RSTCT2 (0xfffece14 )
#define ARM_CKCTL (0xfffece00 )
#include "global_types.h"
//***********************************************************************************************************/
void Lcdtest( void ); //ELCD module testing entry function.
void SetupELCD( int ); //initialize the NEPTUNE SIDE ELCD module.
void InitOptrexLcd( int ); //initialize the OPTREX T51999 LCD module.
void Writedata( int, int ); //write data to TX MEMORY
void Writecommand( int, int ); //write command to external LCD.
void ResetExtModule( ); //Enable external LCD module.
void ReleaseReset ( ); //Release the RESET PIN 。
void updatescreen( int, int , int) ; // paramter 1 for pixel data entry address, 2 is for CS .
void StartLcd( int ); // start cs
void StopLcd ( int ); // stop the cs which is defined by parameter.
void SetupBusSize ( int ); // define bus size
void ConfigurePinofelcdmodule( void ); // configurate the PIN function .
void LcdBlink( int, int ); // screen begin flash about 1 minutes.
int Txfifostatus( ); // check the TX FIFO if it is empty.
void fillTxfifo( int ); // FILL THE TX FIFO.
void localUpdate( int , int , int , int); // update loacal picture of the LCD.
void delay( int ) ;
void setdncstatus( int );
unsigned int packcommand( unsigned int );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -