📄 lcdconf.h
字号:
/*
*********************************************************************************************************
* uC/GUI
* Universal graphic software for embedded applications
*
* (c) Copyright 2002, Micrium Inc., Weston, FL
* (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
* 礐/GUI is protected by international copyright laws. Knowledge of the
* source code may not be used to write a similar product. This file may
* only be used in accordance with a license and should not be redistributed
* in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
Purpose : Sample configuration file
----------------------------------------------------------------------
*/
#include "sdram_k4s561632j.h"
#ifndef _LCDCONF_H
#define _LCDCONF_H
/*********************************************************************
*
* General configuration of LCD
*
**********************************************************************
*/
#define YL_LCD35_32bpp (0)
#define YL_LCD35_16bpp (1)
#define YL_LCD43_16bpp (2)
#define YL_LCD70_16bpp (3)
#define YL_LCD80_16bpp (4)
#define DEF_LCD_TYPE YL_LCD43_16bpp
#if (DEF_LCD_TYPE == YL_LCD70_16bpp )
#define C_GLCD_PIX_CLK (30*1000000UL)
#define C_GLCD_REFRESH_FREQ (50HZ)
#define C_GLCD_H_SIZE 800
#define C_GLCD_H_PULSE 48
#define C_GLCD_H_FRONT_PORCH 40
#define C_GLCD_H_BACK_PORCH 40
#define C_GLCD_V_SIZE 480
#define C_GLCD_V_PULSE 3
#define C_GLCD_V_FRONT_PORCH 13
#define C_GLCD_V_BACK_PORCH 29
#define C_GLCD_BitsPP 16
#define C_GLCD_BytesPP 4
#elif(DEF_LCD_TYPE == YL_LCD80_16bpp )
#define C_GLCD_PIX_CLK (20*1000000UL)
#define C_GLCD_REFRESH_FREQ (50HZ)
#define C_GLCD_H_SIZE 800
#define C_GLCD_H_PULSE 30
#define C_GLCD_H_FRONT_PORCH 210
#define C_GLCD_H_BACK_PORCH 46
#define C_GLCD_V_SIZE 600
#define C_GLCD_V_PULSE 10
#define C_GLCD_V_FRONT_PORCH 13
#define C_GLCD_V_BACK_PORCH 23
#define C_GLCD_BitsPP 16
#define C_GLCD_BytesPP 2
#elif(DEF_LCD_TYPE == YL_LCD35_16bpp )
#define C_GLCD_PIX_CLK (6.4*1000000UL)
#define C_GLCD_REFRESH_FREQ (50HZ)
#define C_GLCD_H_SIZE 320
#define C_GLCD_H_PULSE 30
#define C_GLCD_H_FRONT_PORCH 20
#define C_GLCD_H_BACK_PORCH 38
#define C_GLCD_V_SIZE 240
#define C_GLCD_V_PULSE 3
#define C_GLCD_V_FRONT_PORCH 5
#define C_GLCD_V_BACK_PORCH 15
#define C_GLCD_BitsPP 16
#define C_GLCD_BytesPP 2
#elif(DEF_LCD_TYPE == YL_LCD43_16bpp )
#define C_GLCD_PIX_CLK (9.0*1000000UL)
#define C_GLCD_REFRESH_FREQ (50HZ)
#define C_GLCD_H_SIZE 480
#define C_GLCD_H_PULSE 42
#define C_GLCD_H_FRONT_PORCH 3
#define C_GLCD_H_BACK_PORCH 3
#define C_GLCD_V_SIZE 272
#define C_GLCD_V_PULSE 11
#define C_GLCD_V_FRONT_PORCH 3
#define C_GLCD_V_BACK_PORCH 3
#define C_GLCD_BitsPP 16
#define C_GLCD_BytesPP 2
#else //default lcd type is YL_LCD35_32bpp
#define C_GLCD_PIX_CLK (6.4*1000000UL)
#define C_GLCD_REFRESH_FREQ (50HZ)
#define C_GLCD_H_SIZE 320
#define C_GLCD_H_PULSE 30
#define C_GLCD_H_FRONT_PORCH 20
#define C_GLCD_H_BACK_PORCH 38
#define C_GLCD_V_SIZE 240
#define C_GLCD_V_PULSE 3
#define C_GLCD_V_FRONT_PORCH 5
#define C_GLCD_V_BACK_PORCH 15
#define C_GLCD_BitsPP 32
#define C_GLCD_BytesPP 4
#endif
#define C_GLCD_CLK_PER_LINE (C_GLCD_H_SIZE + C_GLCD_H_PULSE + C_GLCD_H_FRONT_PORCH + C_GLCD_H_BACK_PORCH)
#define C_GLCD_LINES_PER_FRAME (C_GLCD_V_SIZE + C_GLCD_V_PULSE + C_GLCD_V_FRONT_PORCH + C_GLCD_V_BACK_PORCH)
#define LCD_VRAM_BASE_ADDR ((uint32_t)SDRAM_BASE_ADDR + (uint32_t)SDRAM_SIZE - 0x0200000)
#define U_LCD_XSIZE C_GLCD_H_SIZE /* LCD x size */
#define U_LCD_YSIZE C_GLCD_V_SIZE /* LCD y size */
#define LCD_XSIZE C_GLCD_H_SIZE /* X-resolution of LCD, Logical coor. */
#define LCD_YSIZE C_GLCD_V_SIZE /* Y-resolution of LCD, Logical coor. */
#define FALSE 0
#define TRUE 1
#define LCD_ON
#define LCD_OFF
#define C_GLCD_PWR_ENA_DIS_DLY 10000
#define C_GLCD_ENA_DIS_DLY 10000
#define MIRROR_X 1 /* x size mirror */
#define MIRROR_Y 0 /* y size mirror */
#define HWORDMODE 0 /* picture data */
#define LCD_RED 0xf800 /* red color */
#define LCD_GREEN 0x07e0 /* green color */
#define LCD_BLUE 0x001f /* blue color */
#define LCD_BLACK 0x0000 /* black color */
#define LCD_WHITE 0xffff /* white color */
void delay_Ns (int idly);
void LCD_L0_SetPixelIndex(int x, int y, int PixelIndex);
#define LCD_BITSPERPIXEL (16)
#define lpc1788 1788
#define LCD_CONTROLLER lpc1788
#endif /* LCDCONF_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -