From 5e03aead9c9e4b44148a651952dfc09851927106 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 26 Mar 2013 18:18:50 +0000 Subject: More lpc17xx LCD logic (still incomplete) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5787 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h') diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h b/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h index e86e83dfa..e17a8cc53 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h @@ -41,6 +41,8 @@ ************************************************************************************/ #include +#include + #include "chip/lpc17_lcd.h" /************************************************************************************ @@ -48,14 +50,26 @@ ************************************************************************************/ /* Configuration */ +/* Base address of the video RAM frame buffer */ + +#ifndef CONFIG_LPC17_LCD_VRAMBASE +# define CONFIG_LPC17_LCD_VRAMBASE ((uint32_t)LPC17_EXTDRAM_CS0 + 0x00010000) +#endif + +/* LCD refresh rate */ + #ifndef CONFIG_LPC17_LCD_REFRESH_FREQ # define CONFIG_LPC17_LCD_REFRESH_FREQ (50) /* Hz */ #endif +/* Bits per pixel */ + #ifndef CONFIG_LPC17_LCD_BPP # define CONFIG_LPC17_LCD_BPP 16 /* Bytes per pixel */ #endif +/* Color format */ + #undef FB_FMT #if CONFIG_LPC17_LCD_BPP == 16 # define FB_FMT FB_FMT_RGB16_565 @@ -65,6 +79,12 @@ # error "Unsupported BPP" #endif +#ifndef CONFIG_LPC17_LCD_BACKCOLOR +# define CONFIG_LPC17_LCD_BACKCOLOR 0 /* Initial background color */ +#endif + +/* Horizontal video characteristics */ + #ifndef CONFIG_LPC17_LCD_HWIDTH # define CONFIG_LPC17_LCD_HWIDTH 480 /* Width in pixels */ #endif @@ -81,6 +101,8 @@ # define CONFIG_LPC17_LCD_HBACKPORCH 40 #endif +/* Vertical video characteristics */ + #ifndef CONFIG_LPC17_LCD_VHEIGHT # define CONFIG_LPC17_LCD_VHEIGHT 272 /* Height in rows */ #endif @@ -112,4 +134,17 @@ * include/nuttx/fb.h. */ +/************************************************************************************ + * Name: lpc17_lcdclear + * + * Description: + * This is a non-standard LCD interface just for the LPC17xx. Clearing the display + * in the normal way by writing a sequences of runs that covers the entire display + * can be slow. Here the dispaly is cleared by simply setting all VRAM memory to + * the specified color. + * + ************************************************************************************/ + +void lpc17_lcdclear(nxgl_mxpixel_t color); + #endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_LCD_H */ -- cgit v1.2.3