drivers/lcd and configs/olimex-lpc1766stk: Remove support for the Nokia6100 LCD. That LCD uses a 9-bit SPI interface (the 9th bit being the command/data bit that is normally a discrete). That communication was never successfully integrated. I now believe that it would would require some special support from the low-level, MCU SPI driver to manage that 9th bit. The deleted code is still available in the Obsoleted repository in the nuttx/drivers/lcd, nuttx/configs/olimex-lpc1766stk, and Patches directories.
This commit is contained in:
parent
cc1d68bd92
commit
9da3d4a2a9
@ -5845,7 +5845,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, FAR struct kbd_getstate_s *sta
|
||||
<li>
|
||||
<p>
|
||||
<b>Examples</b>:
|
||||
<code>drivers/lcd/nokia6100.c</code>, <code>drivers/lcd/p14201.c</code>, <code>configs/sam3u-ek/src/up_lcd.c.</code>
|
||||
<code>drivers/lcd/p14201.c</code>, <code>configs/sam3u-ek/src/up_lcd.c.</code>
|
||||
See also the usage of the LCD driver in the <code>graphics/</code> directory.
|
||||
</p>
|
||||
</li>
|
||||
|
@ -157,6 +157,13 @@ Olimex LPC1766-STK development board
|
||||
MISO0 and MOSI0 are join via a 1K ohm resistor so the LCD appears to be
|
||||
write only.
|
||||
|
||||
STATUS: The LCD driver was never properly integrated. It is awkward
|
||||
to used because it relies on a 9-bit SPI inteface (the 9th bit being
|
||||
the command/data bit which is normally a discrete input). All support
|
||||
for the Nokia 6100 was removed on May 19, 2018. That obsoleted
|
||||
driver can be viewed in the nuttx/drivers/lcd and configs/olimex-lpc1766stk
|
||||
directories of the Obsoleted repository.
|
||||
|
||||
LEDs
|
||||
^^^^
|
||||
|
||||
@ -798,14 +805,6 @@ Configuration Sub-Directories
|
||||
|
||||
CONFIG_FAT_LFN=y : Enables long file name support
|
||||
|
||||
nx:
|
||||
An example using the NuttX graphics system (NX). This example uses
|
||||
the Nokia 6100 LCD driver.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. The Nokia 6100 driver does not work on this board as of this writing.
|
||||
|
||||
slip-httpd:
|
||||
This configuration is identical to the thttpd configuration except that
|
||||
it uses the SLIP data link layer via a serial driver instead of the
|
||||
|
@ -1,59 +0,0 @@
|
||||
# CONFIG_EXAMPLES_NX_DEFAULT_COLORS is not set
|
||||
# CONFIG_NX_DISABLE_8BPP is not set
|
||||
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
|
||||
CONFIG_ARCH_BOARD_LPC1766STK=y
|
||||
CONFIG_ARCH_BOARD="olimex-lpc1766stk"
|
||||
CONFIG_ARCH_CHIP_LPC1766=y
|
||||
CONFIG_ARCH_CHIP_LPC17XX=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=8111
|
||||
CONFIG_DISABLE_ENVIRON=y
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
CONFIG_DISABLE_POLL=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_NX_BGCOLOR=0x02
|
||||
CONFIG_EXAMPLES_NX_BPP=8
|
||||
CONFIG_EXAMPLES_NX_COLOR1=0xdf
|
||||
CONFIG_EXAMPLES_NX_COLOR2=0xbe
|
||||
CONFIG_EXAMPLES_NX_FONTCOLOR=0x00
|
||||
CONFIG_EXAMPLES_NX_TBCOLOR=0x92
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_HOST_WINDOWS=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LCD_MAXPOWER=127
|
||||
CONFIG_LCD_NOKIA6100=y
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LPC17_SSP0=y
|
||||
CONFIG_LPC17_UART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS=12
|
||||
CONFIG_NFILE_STREAMS=12
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_NX_KBD=y
|
||||
CONFIG_NX_XYINPUT_MOUSE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONT_SANS23X27=y
|
||||
CONFIG_NXSTART_EXTERNINIT=y
|
||||
CONFIG_NXTK_BORDERCOLOR1=6
|
||||
CONFIG_NXTK_BORDERCOLOR2=4
|
||||
CONFIG_NXTK_BORDERCOLOR3=8
|
||||
CONFIG_PREALLOC_MQ_MSGS=4
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_PREALLOC_WDOGS=4
|
||||
CONFIG_RAM_SIZE=32768
|
||||
CONFIG_RAM_START=0x10000000
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=5
|
||||
CONFIG_START_MONTH=12
|
||||
CONFIG_START_YEAR=2010
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_UART0_BAUD=57600
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="nx_main"
|
||||
CONFIG_WDOG_INTRESERVE=0
|
@ -46,10 +46,6 @@ ifeq ($(CONFIG_USBMSC),y)
|
||||
CSRCS += lpc17_usbmsc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NX_LCDDRIVER),y)
|
||||
CSRCS += lpc17_lcd.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_BUTTONS),y)
|
||||
CSRCS += lpc17_buttons.c
|
||||
endif
|
||||
|
@ -1,258 +0,0 @@
|
||||
/****************************************************************************
|
||||
* config/olimex-lpc1766stk/src/lpc17_lcd.c
|
||||
*
|
||||
* Copyright (C) 2010, 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
|
||||
* POSSPBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/nokia6100.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "chip/lpc17_syscon.h"
|
||||
#include "chip/lpc17_pwm.h"
|
||||
#include "lpc17_gpio.h"
|
||||
#include "lpc17_ssp.h"
|
||||
|
||||
#include "lpc1766stk.h"
|
||||
|
||||
#if defined(CONFIG_NX_LCDDRIVER) && defined(CONFIG_LCD_NOKIA6100) && defined(CONFIG_LPC17_SSP0)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Check power setting */
|
||||
|
||||
#if !defined(CONFIG_LCD_MAXPOWER) || CONFIG_LCD_MAXPOWER != 127
|
||||
# error "CONFIG_LCD_MAXPOWER must be 127"
|
||||
#endif
|
||||
|
||||
/* Backlight OFF PWM setting */
|
||||
|
||||
#define NOKIA_BACKLIGHT_OFF 0x40
|
||||
|
||||
/* Define the CONFIG_LCD_NOKIADBG to enable detailed debug output (stuff you
|
||||
* would never want to see unless you are debugging this file).
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DEBUG_INFO
|
||||
# undef CONFIG_LCD_NOKIADBG
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_NOKIADBG
|
||||
# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
|
||||
#else
|
||||
# define lcd_dumpgpio(m)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nokia_blinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize PWM1 to manage the LCD backlight.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void nokia_blinitialize(void)
|
||||
{
|
||||
uint32_t regval;
|
||||
|
||||
/* Enable clocking of PWM1 */
|
||||
|
||||
regval = getreg32(LPC17_SYSCON_PCONP);
|
||||
regval |= SYSCON_PCONP_PCPWM1;
|
||||
putreg32(regval, LPC17_SYSCON_PCONP);
|
||||
|
||||
/* Disable and reset PWM1 */
|
||||
|
||||
regval = getreg32(LPC17_PWM1_TCR);
|
||||
regval &= ~(PWM_TCR_PWMEN|PWM_TCR_CNTREN);
|
||||
regval |= PWM_TCR_CNTRRST;
|
||||
putreg32(regval, LPC17_PWM1_TCR);
|
||||
|
||||
/* Put PWM1 in timer mode */
|
||||
|
||||
regval = getreg32(LPC17_PWM1_CTCR);
|
||||
regval &= ~PWM_CTCR_MODE_MASK;
|
||||
regval |= PWM_CTCR_MODE_TIMER;
|
||||
putreg32(regval, LPC17_PWM1_CTCR);
|
||||
|
||||
/* Reset on MR0 */
|
||||
|
||||
putreg32(PWM_MCR_MR0R, LPC17_PWM1_MCR);
|
||||
|
||||
/* Single edge controlled mod for PWM3 and enable output */
|
||||
|
||||
regval = getreg32(LPC17_PWM1_PCR);
|
||||
regval &= ~PWM_PCR_SEL3;
|
||||
regval |= PWM_PCR_ENA3;
|
||||
putreg32(regval, LPC17_PWM1_PCR);
|
||||
|
||||
/* Clear prescaler */
|
||||
|
||||
putreg32(0, LPC17_PWM1_PR);
|
||||
|
||||
/* Set 8-bit resolution */
|
||||
|
||||
putreg32(0xff, LPC17_PWM1_MCR);
|
||||
|
||||
/* Enable PWM match 1 latch */
|
||||
|
||||
regval = getreg32(LPC17_PWM1_LER);
|
||||
regval |= PWM_LER_M0EN;
|
||||
putreg32(regval, LPC17_PWM1_LER);
|
||||
|
||||
/* Clear match register 3 */
|
||||
|
||||
putreg32(0, LPC17_PWM1_MR3);
|
||||
|
||||
/* Enable PWM1 */
|
||||
|
||||
regval |= PWM_LER_M3EN;
|
||||
putreg32(regval, LPC17_PWM1_LER);
|
||||
|
||||
regval = getreg32(LPC17_PWM1_TCR);
|
||||
regval &= ~(PWM_TCR_CNTRRST);
|
||||
regval |= (PWM_TCR_PWMEN|PWM_TCR_CNTREN);
|
||||
putreg32(regval, LPC17_PWM1_TCR);
|
||||
|
||||
nokia_backlight(0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_graphics_setup
|
||||
*
|
||||
* Description:
|
||||
* Called NX initialization logic to configure the LCD.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct lcd_dev_s *dev;
|
||||
|
||||
/* Configure the LCD GPIOs */
|
||||
|
||||
lcd_dumpgpio("board_graphics_setup: On entry");
|
||||
lpc17_configgpio(LPC1766STK_LCD_RST);
|
||||
lpc17_configgpio(LPC1766STK_LCD_BL);
|
||||
lcd_dumpgpio("board_graphics_setup: After GPIO setup");
|
||||
|
||||
/* Reset the LCD */
|
||||
|
||||
lpc17_gpiowrite(LPC1766STK_LCD_RST, false);
|
||||
up_udelay(10);
|
||||
lpc17_gpiowrite(LPC1766STK_LCD_RST, true);
|
||||
up_mdelay(5);
|
||||
|
||||
/* Configure PWM1 to support the backlight */
|
||||
|
||||
nokia_blinitialize();
|
||||
|
||||
/* Get the SSP0 port (configure as a Freescale SPI port) */
|
||||
|
||||
spi = lpc17_sspbus_initialize(0);
|
||||
if (!spi)
|
||||
{
|
||||
gerr("ERROR: Failed to initialize SSP port 0\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Bind the SSP port to the LCD */
|
||||
|
||||
dev = nokia_lcdinitialize(spi, devno);
|
||||
if (!dev)
|
||||
{
|
||||
gerr("ERROR: Failed to bind SSP port 0 to LCD %d: %d\n", devno);
|
||||
}
|
||||
else
|
||||
{
|
||||
ginfo("Bound SSP port 0 to LCD %d\n", devno);
|
||||
|
||||
/* And turn the LCD on (CONFIG_LCD_MAXPOWER should be 1) */
|
||||
|
||||
(void)dev->setpower(dev, CONFIG_LCD_MAXPOWER);
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nokia_backlight
|
||||
*
|
||||
* Description:
|
||||
* The Nokia 6100 backlight is controlled by logic outside of the LCD
|
||||
* assembly. This function must be provided by board specific logic to
|
||||
* manage the backlight. This function will receive a power value (0:
|
||||
* full off - CONFIG_LCD_MAXPOWER: full on) and should set the backlight
|
||||
* accordingly.
|
||||
*
|
||||
* On the Olimex LPC1766STK, the backlight level is controlled by PWM1.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nokia_backlight(unsigned int power)
|
||||
{
|
||||
uint32_t regval;
|
||||
|
||||
putreg32(NOKIA_BACKLIGHT_OFF + power, LPC17_PWM1_MR3);
|
||||
|
||||
regval = getreg32(LPC17_PWM1_LER);
|
||||
regval |= PWM_LER_M3EN;
|
||||
putreg32(regval, LPC17_PWM1_LER);
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NX_LCDDRIVER && CONFIG_LCD_NOKIA6100 && CONFIG_LPC17_SSP0 */
|
@ -43,9 +43,9 @@ The following peripherals are available in this configuration.
|
||||
|
||||
- LCD: Nokia 6610. This is similar the Nokia 6100 LCD used on other
|
||||
Olimex boards. There is a driver for that LCD at
|
||||
drivers/lcd/nokia6100.c, however, it is not properly
|
||||
integrated. It uses a 9-bit SPI interface which is difficult
|
||||
to get working properly.
|
||||
Obsoleted/nuttx/drivers/lcd/nokia6100.c, however, it was removed
|
||||
because it was not properly integrated. It uses a 9-bit SPI
|
||||
interface which is difficult to get working properly.
|
||||
|
||||
- External Support is included for the onboard SRAM. It uses SRAM
|
||||
SRAM: settings from another board that might need to be tweaked.
|
||||
|
@ -86,8 +86,7 @@ config LCD_NOGETRUN
|
||||
config LCD_MAXCONTRAST
|
||||
int "LCD maximum contrast"
|
||||
default 31 if AQM_1248A
|
||||
default 63 if NOKIA6100_S1D15G10 || LCD_SHARP_MEMLCD
|
||||
default 127 if NOKIA6100_PCF8833
|
||||
default 63 if LCD_SHARP_MEMLCD
|
||||
default 255 if LCD_P14201 || LCD_LCD1602
|
||||
default 63
|
||||
range 1 255
|
||||
@ -162,110 +161,6 @@ config P14201_FRAMEBUFFER
|
||||
framebuffer interface will provide the necessary buffering.
|
||||
endif
|
||||
|
||||
config LCD_NOKIA6100
|
||||
bool "Nokia 6100 display support"
|
||||
default n
|
||||
---help---
|
||||
nokia6100.c. Supports the Nokia 6100 display with either the Philips
|
||||
PCF883 or the Epson S1D15G10 display controller. This LCD is used
|
||||
with the Olimex LPC1766-STK (but has not been fully integrated).
|
||||
|
||||
if LCD_NOKIA6100
|
||||
|
||||
config NOKIA6100_NINTERFACES
|
||||
int "Number of physical NOKIA6100 devices"
|
||||
default 1
|
||||
range 1 1
|
||||
---help---
|
||||
Specifies the number of physical Nokia
|
||||
6100 devices that will be supported.
|
||||
|
||||
choice NOKIA6100_CONTROLLER
|
||||
prompt "Controller Setup"
|
||||
default NOKIA6100_S1D15G10
|
||||
|
||||
config NOKIA6100_S1D15G10
|
||||
bool "S1D15G10 controller"
|
||||
---help---
|
||||
Selects the Epson S1D15G10 display controller
|
||||
|
||||
config NOKIA6100_PCF8833
|
||||
bool "PCF8833 controller"
|
||||
---help---
|
||||
Selects the Phillips PCF8833 display controller
|
||||
|
||||
endchoice
|
||||
|
||||
config NOKIA6100_SPIMODE
|
||||
int "SPI mode"
|
||||
default 0
|
||||
range 0 3
|
||||
---help---
|
||||
Controls the SPI mode
|
||||
|
||||
config NOKIA6100_FREQUENCY
|
||||
int "SPI frequency"
|
||||
default 1000000
|
||||
---help---
|
||||
Define to use a different bus frequency
|
||||
|
||||
config NOKIA6100_BPP
|
||||
int "Display bits per pixel"
|
||||
default 8
|
||||
---help---
|
||||
Device supports 8, 12, and 16 bits per pixel.
|
||||
|
||||
config NOKIA6100_BLINIT
|
||||
int "Back light initial"
|
||||
default 40
|
||||
---help---
|
||||
Initial backlight setting
|
||||
|
||||
config NOKIA6100_INVERT
|
||||
int "Display inversion"
|
||||
default 1
|
||||
range 0 1
|
||||
---help---
|
||||
Display inversion, 0 or 1, Default: 1
|
||||
|
||||
config NOKIA6100_MY
|
||||
int "Display row direction"
|
||||
default 0
|
||||
range 0 1
|
||||
---help---
|
||||
Display row direction, 0 or 1, Default: 0
|
||||
|
||||
config NOKIA6100_MX
|
||||
int "Display column direction"
|
||||
default 1
|
||||
range 0 1
|
||||
---help---
|
||||
Display column direction, 0 or 1, Default: 1
|
||||
|
||||
config NOKIA6100_V
|
||||
int "Display address direction"
|
||||
default 0
|
||||
range 0 1
|
||||
---help---
|
||||
Display address direction, 0 or 1, Default: 0
|
||||
|
||||
config NOKIA6100_ML
|
||||
int "Display scan direction"
|
||||
default 0
|
||||
range 0 1
|
||||
---help---
|
||||
Display scan direction, 0 or 1, Default: 0
|
||||
|
||||
config NOKIA6100_RGBORD
|
||||
int "Display RGB order"
|
||||
default 0
|
||||
range 0 1
|
||||
---help---
|
||||
Display RGB order, 0 or 1, Default: 0
|
||||
Required LCD driver settings:
|
||||
|
||||
endif
|
||||
|
||||
config LCD_MAX7219
|
||||
bool "Matrix of 8x8 LEDs controlled by MAX7219"
|
||||
default n
|
||||
|
@ -56,10 +56,6 @@ ifeq ($(CONFIG_LCD_P14201),y)
|
||||
CSRCS += p14201.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LCD_NOKIA6100),y)
|
||||
CSRCS += nokia6100.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LCD_UG2864AMBAG01),y)
|
||||
CSRCS += ug-2864ambag01.c
|
||||
endif
|
||||
|
@ -100,10 +100,6 @@ Re-usable LCD drivers reside in the drivers/lcd directory:
|
||||
Technology Co., Ltd. This LCD is based on the Ilitek ILI9341 LCD
|
||||
controller.
|
||||
|
||||
nokia6100.c. Supports the Nokia 6100 display with either the Philips
|
||||
PCF883 or the Epson S1D15G10 display controller. This LCD is used
|
||||
with the Olimex LPC1766-STK (but has not been fully integrated).
|
||||
|
||||
ssd12989.c. Generic LCD driver for LCDs based on the Solomon Systech
|
||||
SSD1289 LCD controller. Think of this as a template for an LCD driver
|
||||
that you will probably have to customize for any particular LCD
|
||||
@ -177,13 +173,6 @@ that makes then less re-usable:
|
||||
configs/kwikstik-k40/src/k40_lcd.c. Don't waste your time. This is
|
||||
just a stub.
|
||||
|
||||
Nokia LCD Drivers:
|
||||
|
||||
configs/olimex-lpc1766stk/src/lpc17_lcd.c. This examples is the
|
||||
bottom half for the driver at drivers/lcd/nokia6100.c.
|
||||
This was never completely debugged ... there are probably issues
|
||||
with that nasty 9-bit SPI interfaces.
|
||||
|
||||
HX8346:
|
||||
|
||||
configs/sam3u-ek/src/sam_lcd.c. The SAM3U-EK development board features
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,144 +0,0 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/lcd/nokia6100.h
|
||||
* Application interface to the Nokia 6100 LCD display
|
||||
*
|
||||
* Copyright (C) 2010, 2015 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 __INCLUDE_NUTTX_NOKIA6100_H
|
||||
#define __INCLUDE_NUTTX_NOKIA6100_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Nokia 6100 Configuration Settings:
|
||||
*
|
||||
* CONFIG_NOKIA6100_SPIMODE - Controls the SPI mode
|
||||
* CONFIG_NOKIA6100_FREQUENCY - Define to use a different bus frequency
|
||||
* CONFIG_NOKIA6100_NINTERFACES - Specifies the number of physical Nokia
|
||||
* 6100 devices that will be supported.
|
||||
* CONFIG_NOKIA6100_BPP - Device supports 8, 12, and 16 bits per pixel.
|
||||
* CONFIG_NOKIA6100_S1D15G10 - Selects the Epson S1D15G10 display controller
|
||||
* CONFIG_NOKIA6100_PCF8833 - Selects the Phillips PCF8833 display controller
|
||||
* CONFIG_NOKIA6100_BLINIT - Initial backlight setting
|
||||
*
|
||||
* The following may need to be tuned for your hardware:
|
||||
* CONFIG_NOKIA6100_INVERT - Display inversion, 0 or 1, Default: 1
|
||||
* CONFIG_NOKIA6100_MY - Display row direction, 0 or 1, Default: 0
|
||||
* CONFIG_NOKIA6100_MX - Display column direction, 0 or 1, Default: 1
|
||||
* CONFIG_NOKIA6100_V - Display address direction, 0 or 1, Default: 0
|
||||
* CONFIG_NOKIA6100_ML - Display scan direction, 0 or 1, Default: 0
|
||||
* CONFIG_NOKIA6100_RGBORD - Display RGB order, 0 or 1, Default: 0
|
||||
*
|
||||
* Required LCD driver settings:
|
||||
* CONFIG_LCD_NOKIA6100 - Enable Nokia 6100 support
|
||||
* CONFIG_LCD_MAXCONTRAST - must be 63 with the Epson controller and 127 with
|
||||
* the Phillips controller.
|
||||
* CONFIG_LCD_MAXPOWER - Maximum value of backlight setting. The backlight
|
||||
* control is managed outside of the 6100 driver so this value has no
|
||||
* meaning to the driver. Board-specific logic may place restrictions on
|
||||
* this value.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nokia_lcdinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the NOKIA6100 video hardware. The initial state of the LCD
|
||||
* is fully initialized, display memory cleared, and the LCD ready to use,
|
||||
* but with the powersetting at 0 (full off == sleep mode).
|
||||
*
|
||||
* Input Parameters:
|
||||
*
|
||||
* spi - A reference to the SPI driver instance.
|
||||
* devno - A value in the range of 0 throuh CONFIG_NOKIA6100_NINTERFACES-1.
|
||||
* This allows support for multiple LCD devices.
|
||||
*
|
||||
* Returned Value:
|
||||
*
|
||||
* On success, this function returns a reference to the LCD object for the
|
||||
* specified LCD. NULL is returned on any failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct lcd_dev_s; /* see nuttx/lcd.h */
|
||||
struct spi_dev_s; /* see nuttx/spi/spi.h */
|
||||
FAR struct lcd_dev_s *nokia_lcdinitialize(FAR struct spi_dev_s *spi,
|
||||
unsigned int devno);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nokia_backlight
|
||||
*
|
||||
* Description:
|
||||
* The Nokia 6100 backlight is controlled by logic outside of the LCD
|
||||
* assembly. This function must be provided by board specific logic to
|
||||
* manage the backlight. This function will receive a power value (0: full
|
||||
* off - CONFIG_LCD_MAXPOWER: full on) and should set the backlight
|
||||
* accordingly.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nokia_backlight(unsigned int power);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_NOKIA6100_H */
|
Loading…
Reference in New Issue
Block a user