diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-26 16:56:09 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-26 16:56:09 +0000 |
commit | bd800e9348fe0ab62fa37a1f04c9a40f21bedf46 (patch) | |
tree | 9fa3ab0047612050c7bb22e9f9409f43b59a84a9 /nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h | |
parent | 97802f4b576ac03abedd9f19fe40980a42e20ddb (diff) | |
download | px4-nuttx-bd800e9348fe0ab62fa37a1f04c9a40f21bedf46.tar.gz px4-nuttx-bd800e9348fe0ab62fa37a1f04c9a40f21bedf46.tar.bz2 px4-nuttx-bd800e9348fe0ab62fa37a1f04c9a40f21bedf46.zip |
Some initial LCD logic for the lpc1788 (still a work-in-progress)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5786 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h')
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h b/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h new file mode 100644 index 000000000..e86e83dfa --- /dev/null +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_lcd.h @@ -0,0 +1,115 @@ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_lcd.h + * + * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_LCD_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_LCD_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include <nuttx/config.h> +#include "chip/lpc17_lcd.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Configuration */ + +#ifndef CONFIG_LPC17_LCD_REFRESH_FREQ +# define CONFIG_LPC17_LCD_REFRESH_FREQ (50) /* Hz */ +#endif + +#ifndef CONFIG_LPC17_LCD_BPP +# define CONFIG_LPC17_LCD_BPP 16 /* Bytes per pixel */ +#endif + +#undef FB_FMT +#if CONFIG_LPC17_LCD_BPP == 16 +# define FB_FMT FB_FMT_RGB16_565 +#elif CONFIG_LPC17_LCD_BPP == 24 +# define FB_FMT FB_FMT_RGB24 +#else +# error "Unsupported BPP" +#endif + +#ifndef CONFIG_LPC17_LCD_HWIDTH +# define CONFIG_LPC17_LCD_HWIDTH 480 /* Width in pixels */ +#endif + +#ifndef CONFIG_LPC17_LCD_HPULSE +# define CONFIG_LPC17_LCD_HPULSE 2 +#endif + +#ifndef CONFIG_LPC17_LCD_HFRONTPORCH +# define CONFIG_LPC17_LCD_HFRONTPORCH 5 +#endif + +#ifndef CONFIG_LPC17_LCD_HBACKPORCH +# define CONFIG_LPC17_LCD_HBACKPORCH 40 +#endif + +#ifndef CONFIG_LPC17_LCD_VHEIGHT +# define CONFIG_LPC17_LCD_VHEIGHT 272 /* Height in rows */ +#endif + +#define CONFIG_LPC17_LCD_VPULSE +# define CONFIG_LPC17_LCD_VPULSE 2 +#endif + +#ifndef CONFIG_LPC17_LCD_VFRONTPORCH +# define CONFIG_LPC17_LCD_VFRONTPORCH 8 +#endif + +#ifndef CONFIG_LPC17_LCD_VBACKPORCH +# define CONFIG_LPC17_LCD_VBACKPORCH 8 +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ +/* The LPC17 LCD driver uses the common framebuffer interfaces declared in + * include/nuttx/fb.h. + */ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_LCD_H */ |