Add apps/system/ramtest. I will use this for the LPC1788 SDRAM bringup

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5791 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2013-03-27 00:03:25 +00:00
parent 1193d32989
commit e97f6a06e2
2 changed files with 35 additions and 0 deletions
+11
View File
@@ -654,6 +654,14 @@ config LPC17_LCD_TFTPANEL
display panels require the digital color value of each pixel to be display panels require the digital color value of each pixel to be
applied to the display data inputs. applied to the display data inputs.
config LPC17_LCD_MONOCHROME
bool "Monochrome LCD"
default n
depends on !LPC17_LCD_TFTPANEL
---help---
STN LCD monochrome/color selection. Selects monochrome LCD. This
selection has no meaning for a TFT panel.
choice choice
prompt "Bits per pixel" prompt "Bits per pixel"
default LPC17_LCD_BPP24 if LPC17_LCD_TFTPANEL default LPC17_LCD_BPP24 if LPC17_LCD_TFTPANEL
@@ -673,6 +681,7 @@ config LPC17_LCD_BPP8
config LPC17_LCD_BPP16 config LPC17_LCD_BPP16
bool "16 bit per pixel" bool "16 bit per pixel"
depends on !LPC17_LCD_MONOCHROME
config LPC17_LCD_BPP24 config LPC17_LCD_BPP24
bool "24 bit per pixel" bool "24 bit per pixel"
@@ -680,9 +689,11 @@ config LPC17_LCD_BPP24
config LPC17_LCD_BPP16_565 config LPC17_LCD_BPP16_565
bool "16 bpp, 5:6:5 mode" bool "16 bpp, 5:6:5 mode"
depends on !LPC17_LCD_MONOCHROME
config LPC17_LCD_BPP12_444 config LPC17_LCD_BPP12_444
bool "12 bpp, 4:4:4 mode" bool "12 bpp, 4:4:4 mode"
depends on !LPC17_LCD_MONOCHROME
endchoice endchoice
+24
View File
@@ -563,6 +563,30 @@ int up_fbinitialize(void)
regval &= ~LCD_CTRL_BGR; regval &= ~LCD_CTRL_BGR;
putreg32(regval, LPC17_LCD_CTRL); putreg32(regval, LPC17_LCD_CTRL);
/* Select monochrome or color LCD */
#ifdef CONFIG_LPC17_LCD_MONOCHROME
/* Select monochrome LCD */
regval &= ~LCD_CTRL_BGR;
putreg32(regval, LPC17_LCD_CTRL);
/* Select 4- or 8-bit monochrome interface */
#if LPC17_BPP > 4
regval |= LCD_CTRL_LCDMONO8;
#else
regval &= ~LCD_CTRL_LCDMONO8;
#endif
putreg32(regval, LPC17_LCD_CTRL);
#else
/* Select color LCD */
regval &= ~(LCD_CTRL_LCDBW | LCD_CTRL_LCDMONO8);
putreg32(regval, LPC17_LCD_CTRL);
#endif
/* Little endian byte order */ /* Little endian byte order */
regval &= ~LCD_CTRL_BEBO; regval &= ~LCD_CTRL_BEBO;