summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h')
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h35
1 files changed, 35 insertions, 0 deletions
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 <nuttx/config.h>
+#include <nuttx/nx/nxglib.h>
+
#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 */