diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-27 00:03:25 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-27 00:03:25 +0000 |
commit | 5ee86601a172384191c3ea92d72785711c7cc201 (patch) | |
tree | 6e33b0a28fa60847df651760f7fa97afe6c15e48 /nuttx/arch/arm/src/lpc17xx/lpc17_lcd.c | |
parent | 68cd11bf2a8f0f37e733572ce2bad747c3ee81b3 (diff) | |
download | px4-nuttx-5ee86601a172384191c3ea92d72785711c7cc201.tar.gz px4-nuttx-5ee86601a172384191c3ea92d72785711c7cc201.tar.bz2 px4-nuttx-5ee86601a172384191c3ea92d72785711c7cc201.zip |
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
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_lcd.c')
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_lcd.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.c b/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.c index c10d8ade7..dccc10404 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.c @@ -563,6 +563,30 @@ int up_fbinitialize(void) regval &= ~LCD_CTRL_BGR; 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 */ regval &= ~LCD_CTRL_BEBO; |