⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd_params.c

📁 sharp的arm920t 7A400的评估板附带光盘Sharp KEVLH7A400 v0.3b Welcome to the SHARP KEV7A400 Evaluation board
💻 C
📖 第 1 页 / 共 2 页
字号:
/**********************************************************************
 *	$Workfile:   lcd_params.c  $
 *	$Revision:   1.4  $
 *	$Author:   SuryanG  $
 *	$Date:   Jan 24 2002 18:28:34  $
 *
 *	Project: LH7A400
 *
 *	Description:
 *   LH7A400 Color LCD Controller test program
 *   This file contains the parameter definitions for each
 *   of the LCD panels tested with the LH7A400.
 *
 *	Revision History:
 *	$Log:   P:/PVCS6_6/archives/LH7A400 (Aruba)/LCD/lcd_params.c-arc  $
 * 
 *    Rev 1.4   Jan 24 2002 18:28:34   SuryanG
 * Corrected vertical sync pulse width value from 2 to 1, for the 
 * LQ039 HRTFT display.
 * 
 *    Rev 1.3   Jan 09 2002 09:14:56   KovitzP
 * Removed the BGR bit setting from the LCD control register
 * field. If you want that bit set, call lcd_color_bgr().
 * 
 *    Rev 1.2   Jan 07 2002 12:00:56   MaysR
 * Added support for CSTN displays for Arbiter testing.
 * Added LM057QCTT03 320x240x8bpp.
 * Added LM5Q321 (clock rate values for this display should be changed if user intends to use this display).
 *
 *    Rev 1.1   Nov 08 2001 18:14:58   SuryanG
 * No code change. Added file banner.
 *
 *
 *    Rev 1.0   Aug 13 2001 10:22:34   StokerD
 * Initial revision.
 *
 *	COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
 *		CAMAS, WA
 *********************************************************************/


/*
This file contains the manifest constant definitions for the various
displays supported by the LH7A400 CLCDC controller
*/

#include "LH7A400_CLCDC_driver.h"

/*
These settings are for the Sharp LQ039Q2DS53 HRTFT 1/4 VGA display
driven by the lh7A400.
*/

#define LQ039Q2DS53_DISP_WIDTH      (320)
#define LQ039Q2DS53_DISP_HEIGHT     (240)
#define LQ039Q2DS53_DISP_PAL        (256)


/*
horizontal timing
sync pulse =       12
back porch =       20
pixels per line = 320
front porch =      10
total =           362 clocks per line

Define to value + 1 because it will be subtracted in the macros.
*/
#define LQ039Q2DS53_HORIZONTAL_BACK_PORCH (21)

#define LQ039Q2DS53_HORIZONTAL_SYNC_WIDTH (13)
#define LQ039Q2DS53_HORIZONTAL_FRONT_PORCH (11)
#define LQ039Q2DS53_LCDC_LCDTIMING0 (\
   CLCDC_LCDTIMING0_PPL(LQ039Q2DS53_DISP_WIDTH) | \
   CLCDC_LCDTIMING0_HSW(LQ039Q2DS53_HORIZONTAL_SYNC_WIDTH) |  \
   CLCDC_LCDTIMING0_HFP(LQ039Q2DS53_HORIZONTAL_FRONT_PORCH) |  \
   CLCDC_LCDTIMING0_HBP(LQ039Q2DS53_HORIZONTAL_BACK_PORCH) )

/*
vertical timing
Sync pulse width = 0
Vertical back porch =  4
lines per panel = 240
Vertical front porch = 4

Define to value + 1 because it will be subtracted in the macros.
*/
#define LQ039Q2DS53_VERTICAL_SYNC_WIDTH  (1)
#define LQ039Q2DS53_VERTICAL_FRONT_PORCH  (5)
#define LQ039Q2DS53_VERTICAL_BACK_PORCH  (5)

#define LQ039Q2DS53_LCDC_LCDTIMING1 (\
   CLCDC_LCDTIMING1_LPP(LQ039Q2DS53_DISP_HEIGHT) | \
   CLCDC_LCDTIMING1_VSW(LQ039Q2DS53_VERTICAL_SYNC_WIDTH) | \
   CLCDC_LCDTIMING1_VFP(LQ039Q2DS53_VERTICAL_FRONT_PORCH) | \
   CLCDC_LCDTIMING1_VBP(LQ039Q2DS53_VERTICAL_BACK_PORCH) )

/*
compute as close as you can get to
Nominal without going over Max Frequency
*/

#define LQ039Q2DS53_MIN_FREQUENCY (4500000)
#define LQ039Q2DS53_NOMINAL_FREQUENCY (6325000)
#define LQ039Q2DS53_MAX_FREQUENCY (6800000)

/* compute PCD value and whether to set BCD at run-time */

/* invert horizontal sync and pixel clock for this display */
#define LQ039Q2DS53_LCDC_LCDTIMING2 ( \
   (CLCDC_LCDTIMING2_IHS) | \
   (CLCDC_LCDTIMING2_IPC) | \
   (CLCDC_LCDTIMING2_CPL(LQ039Q2DS53_DISP_WIDTH - 1 ) ) )

#define LQ039Q2DS53_LCDC_LCDTIMING3 (0)

#define LQ039Q2DS53_LCDC_LCDINTRENABLE (0)

/* this turns on the controller without turning on the power */
/* Bits per pixel is determined from the image at run-time */

#define LQ039Q2DS53_LCDC_LCDCTRL ( \
   CLCDC_LCDCTRL_ENABLE | \
   CLCDC_LCDCTRL_BW_COLOR | \
   CLCDC_LCDCTRL_TFT | \
   CLCDC_LCDCTRL_VCOMP(CLCDC_LCDCTRL_VCOMP_VS) | \
   CLCDC_LCDCTRL_WATERMARK)

#define LQ039Q2DS53_LCDICP_LCDCONTROL ( \
           LCDICP_CONTROL_SPSEN | \
           LCDICP_CONTROL_CLSEN )

#define LQ039Q2DS53_LCDICP_LCDSETUP ( \
            LCDICP_SETUP_EN | \
				LCDICP_SETUP_PPL(LQ039Q2DS53_DISP_WIDTH) | \
                LCDICP_SETUP_VERT_NORMAL | \
                LCDICP_SETUP_HORIZ_NORMAL | \
                LCDICP_SETUP_MODE_HRTFT )

#define LQ039Q2DS53_LCDICP_LCDTIMING1 ( \
			LCDICP_TIMING1_PSDEL_CLSDEL(9) | \
            LCDICP_TIMING1_REVDEL(3) | \
            LCDICP_TIMING1_LPDEL(14) )

#define LQ039Q2DS53_LCDICP_LCDTIMING2 ( \
            LCDICP_TIMING2_SPLVALUE( (LQ039Q2DS53_HORIZONTAL_BACK_PORCH \
            + LQ039Q2DS53_HORIZONTAL_SYNC_WIDTH + 2) ) | \
            LCDICP_TIMING2_PSDEL2_CLSDEL2(209) )


/* End of defines for LQ039Q2DS53 */

/*
These settings are for the Sharp LQ057Q3DC02 5.7" TFT 1/4 VGA display
driven by the lh7A400.
*/

#define LQ057Q3DC02_DISP_WIDTH      (320)
#define LQ057Q3DC02_DISP_HEIGHT     (240)
#define LQ057Q3DC02_DISP_PAL        (256)


/*
horizontal timing
sync pulse =       96
back porch =       10
pixels per line = 320
front porch =      70
total =           496 clocks per line
Define to value + 1 because it will be subtracted in the macros.
*/
#define LQ057Q3DC02_HORIZONTAL_BACK_PORCH (11)
#define LQ057Q3DC02_HORIZONTAL_SYNC_WIDTH (97)
#define LQ057Q3DC02_HORIZONTAL_FRONT_PORCH (71)

#define LQ057Q3DC02_LCDC_LCDTIMING0 (\
   CLCDC_LCDTIMING0_PPL(LQ057Q3DC02_DISP_WIDTH) | \
   CLCDC_LCDTIMING0_HSW(LQ057Q3DC02_HORIZONTAL_SYNC_WIDTH) |  \
   CLCDC_LCDTIMING0_HFP(LQ057Q3DC02_HORIZONTAL_FRONT_PORCH) |  \
   CLCDC_LCDTIMING0_HBP(LQ057Q3DC02_HORIZONTAL_BACK_PORCH) )

/*
vertical timing
Sync pulse width = 5
Vertical back porch = 2
lines per panel = 240
Vertical front porch = 15
Define to value + 1 because it will be subtracted in the macros.
*/
#define LQ057Q3DC02_VERTICAL_SYNC_WIDTH (6)
#define LQ057Q3DC02_VERTICAL_FRONT_PORCH (16)
#define LQ057Q3DC02_VERTICAL_BACK_PORCH (3)

#define LQ057Q3DC02_LCDC_LCDTIMING1 (\
   CLCDC_LCDTIMING1_LPP(LQ057Q3DC02_DISP_HEIGHT) | \
   CLCDC_LCDTIMING1_VSW(LQ057Q3DC02_VERTICAL_SYNC_WIDTH) | \
   CLCDC_LCDTIMING1_VFP(LQ057Q3DC02_VERTICAL_FRONT_PORCH) | \
   CLCDC_LCDTIMING1_VBP(LQ057Q3DC02_VERTICAL_BACK_PORCH) )

/*
compute as close as you can get to
Nominal without going over Max Frequency
*/

#define LQ057Q3DC02_MIN_FREQUENCY (4500000)
#define LQ057Q3DC02_NOMINAL_FREQUENCY (6300000)
#define LQ057Q3DC02_MAX_FREQUENCY (7000000)

/* compute PCD value and whether to set BCD at run-time */

#define LQ057Q3DC02_LCDC_LCDTIMING2 ( \
   (CLCDC_LCDTIMING2_IVS) | \
   (CLCDC_LCDTIMING2_IHS) | \
   (CLCDC_LCDTIMING2_CPL(LQ057Q3DC02_DISP_WIDTH - 1 ) ) )

#define LQ057Q3DC02_LCDC_LCDTIMING3 (0)

#define LQ057Q3DC02_LCDC_LCDINTRENABLE (0)

/* this turns on the controller without turning on the power */
/* Bits per pixel is determined from the image at run-time */

#define LQ057Q3DC02_LCDC_LCDCTRL ( \
   CLCDC_LCDCTRL_ENABLE | \
   CLCDC_LCDCTRL_BW_COLOR | \
   CLCDC_LCDCTRL_TFT | \
   CLCDC_LCDCTRL_VCOMP(CLCDC_LCDCTRL_VCOMP_VS) | \
   CLCDC_LCDCTRL_WATERMARK)

#define LQ057Q3DC02_LCDICP_LCDCONTROL (0)

#define LQ057Q3DC02_LCDICP_LCDSETUP ( \
            LCDICP_SETUP_EN | \
				LCDICP_SETUP_PPL((LQ057Q3DC02_DISP_WIDTH) - 1) | \
            LCDICP_SETUP_MODE_BYPASS )

#define LQ057Q3DC02_LCDICP_LCDTIMING1 (0)

#define LQ057Q3DC02_LCDICP_LCDTIMING2 (0)

/* end of defines for LQ057Q3DC02 */



/*
These settings are for the Sharp LQ121S1DG31 12.1" TFT SVGA display
driven by the lh7A400.
*/

#define LQ121S1DG31_DISP_WIDTH      (800)
#define LQ121S1DG31_DISP_HEIGHT     (600)
#define LQ121S1DG31_DISP_PAL        (256)


/*
horizontal timing
sync pulse =       128
back porch =       88
pixels per line = 800
front porch =      168
total =          4 clocks per line
Define to value + 1 because it will be subtracted in the macros.
*/
#define LQ121S1DG31_HORIZONTAL_BACK_PORCH (89)
#define LQ121S1DG31_HORIZONTAL_SYNC_WIDTH (129)
#define LQ121S1DG31_HORIZONTAL_FRONT_PORCH (169)

#define LQ121S1DG31_LCDC_LCDTIMING0 (\
   CLCDC_LCDTIMING0_PPL(LQ121S1DG31_DISP_WIDTH) | \
   CLCDC_LCDTIMING0_HSW(LQ121S1DG31_HORIZONTAL_SYNC_WIDTH) |  \
   CLCDC_LCDTIMING0_HFP(LQ121S1DG31_HORIZONTAL_FRONT_PORCH) |  \
   CLCDC_LCDTIMING0_HBP(LQ121S1DG31_HORIZONTAL_BACK_PORCH) )

/*
vertical timing
Sync pulse width = 4
Vertical back porch = 23
lines per panel = 600
Vertical front porch = 43
Define to value + 1 because it will be subtracted in the macros.
*/
#define LQ121S1DG31_VERTICAL_SYNC_WIDTH (5)
#define LQ121S1DG31_VERTICAL_FRONT_PORCH (44)
#define LQ121S1DG31_VERTICAL_BACK_PORCH (24)

#define LQ121S1DG31_LCDC_LCDTIMING1 (\
   CLCDC_LCDTIMING1_LPP(LQ121S1DG31_DISP_HEIGHT) | \
   CLCDC_LCDTIMING1_VSW(LQ121S1DG31_VERTICAL_SYNC_WIDTH) | \
   CLCDC_LCDTIMING1_VFP(LQ121S1DG31_VERTICAL_FRONT_PORCH) | \
   CLCDC_LCDTIMING1_VBP(LQ121S1DG31_VERTICAL_BACK_PORCH) )

/*
compute as close as you can get to

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -