Add beginning of Nokia6100 driver

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3162 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2010-12-05 16:16:50 +00:00
parent a6958d7942
commit e67b0093be
6 changed files with 1135 additions and 4 deletions
+6 -2
View File
@@ -33,11 +33,15 @@
#
############################################################################
LCD_ASRCS =
LCD_ASRCS =
LCD_CSRCS =
ifeq ($(CONFIG_NX_LCDDRIVER),y)
ifeq ($(CONFIG_LCD_P14201),y)
LCD_CSRCS = p14201.c
else
LCD_CSRCS =
ifeq ($(CONFIG_LCD_NOKIA6100),y)
LCD_CSRCS = nokia6100.c
else
endif
+997
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -107,6 +107,14 @@
#define PCF8833_ECM 0xf0 /* Enter Calibration mode; Data: (1) Calibration control settings */
#define PCF8833_OTPSHTIN 0xf1 /* Shift data in OTP shift registers; Data: Any number of bytes */
/* Memory data access control (MADCTL) bit definitions */
#define MADCTL_RGB (1 << 3) /* Bit 3: BGR */
#define MADCTL_LAO (1 << 4) /* Bit 4: Line address order bottom to top */
#define MADCTL_V (1 << 5) /* Bit 5: Vertical RAM write; in Y direction */
#define MADCTL_MX (1 << 6) /* Bit 6: Mirror X */
#define MADCTL_MY (1 << 7) /* Bit 7: Mirror Y */
/* PCF8833 status register bit definitions */
/* CMD format: RDDST command followed by four status bytes: */
/* Byte 1: D31 d30 D29 D28 D27 D26 --- --- */
+35
View File
@@ -85,6 +85,41 @@
#define S1D15G10_NOP 0x25 /* NOP intruction (0x45?); Data: none */
#define S1D15G10_STREAD 0x20 /* Status read; Data: none */
/* Display control (DISCTL) bit definitions */
#define DISCTL_PERIOD_SHIFT (0) /* P1: Bits 0-1, F1 and F2 drive-pattern switching period */
#define DISCTL_PERIOD_MASK (3 << DISCTL_PERIOD_SHIFT)
# define DISCTL_PERIOD_8 (0 << DISCTL_PERIOD_SHIFT)
# define DISCTL_PERIOD_4 (1 << DISCTL_PERIOD_SHIFT)
# define DISCTL_PERIOD_16 (2 << DISCTL_PERIOD_SHIFT)
# define DISCTL_PERIOD_FLD (3 << DISCTL_PERIOD_SHIFT)
#define DISCTL_CLDIV_SHIFT (2) /* P1: Bits 2-4, Clock divider */
#define DISCTL_CLDIV_MASK (7 << DISCTL_CLDIV_SHIFT)
# define DISCTL_CLDIV_2 (0 << DISCTL_CLDIV_SHIFT)
# define DISCTL_CLDIV_4 (1 << DISCTL_CLDIV_SHIFT)
# define DISCTL_CLDIV_8 (2 << DISCTL_CLDIV_SHIFT)
# define DISCTL_CLDIV_NONE (3 << DISCTL_CLDIV_SHIFT)
/* Power control (PWRCTR) bit definitions */
#define PWCTR_REFVOLTAGE (1 << 0) /* P1: Bit 0, Turn on reference voltage generation circuit. */
#define PWCTR_REGULATOR (1 << 1) /* P1: Bit 1, Turn on voltage regulator and circuit voltage follower. */
#define PWCTR_BOOSTER2 (1 << 2) /* P1: Bit 2, Turn on secondary booster/step-down circuit. */
#define PWCTR_BOOSTER1 (1 << 3) /* P1: Bit 3, Turn on primary booster circuit. */
#define PWCTR_EXTR (1 << 4) /* P1: Bit 4, Use external resistance to adjust voltage. */
/* Data control (DATCTL) bit definitions */
#define DATCTL_PGADDR_INV (1 << 0) /* P1: Bit 0, Inverse display of the page address. */
#define DATCTL_COLADDR_REV (1 << 1) /* P1: Bit 1, Reverse turn of column address. */
#define DATCTL_ADDR_PGDIR (1 << 2) /* P1: Bit 2, Address-scan direction in page (vs column) direction. */
#define DATCTL_BGR (1 << 0) /* P2: Bit0, RGB->BGR */
#define DATCTL_8GRAY (1) /* P3: Bits 0-2 = 001, 8 gray-scale */
#define DATCTL_16GRAY_A (2) /* P3: Bits 0-2 = 010, 16 gray-scale display type A */
#define DATCTL_16GRAY_B (4) /* P3: Bits 0-2 = 100, 16 gray-scale display type B */
/* Status register bit definions (after reset or NOP) */
#define S1D15G10_SR_PARTIAL (1 << 0) /* Bit 0: Partial display */
+5 -1
View File
@@ -53,10 +53,14 @@
* 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
*
* Required LCD driver settings:
* CONFIG_LCD_NOKIA6100 - Enable Nokia 6100 support
* CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
* CONFIG_LCD_MAXCONTRAST - must be 63 with the Epson controller and 127 with
* the Phillips controller.
* CONFIG_LCD_MAXPOWER must be 1
*/
+84 -1
View File
@@ -103,7 +103,7 @@
#define RGB24_SNOW 0x00fffafa
#define RGB24_YELLOW 0x00ffff00
/* RGB24-565: RRRRRGGG GGGBBBBB */
/* RGB16-565: RRRRRGGG GGGBBBBB */
#define RGB16_BLACK 0x0000
#define RGB16_WHITE 0xffff
@@ -145,6 +145,89 @@
#define RGB16_SNOW 0xffdf
#define RGB16_YELLOW 0xffe0
/* RGB12-444: RRRR GGGGBBBB */
#define RGB12_BLACK 0x0000
#define RGB12_WHITE 0x0fff
#define RGB12_BLUE 0x000f
#define RGB12_GREEN 0x00f0
#define RGB12_RED 0x0f00
#define RGB12_NAVY 0x0008
#define RGB12_DARKBLUE 0x0009
#define RGB12_DARKGREEN 0x0060
#define RGB12_DARKCYAN 0x0099
#define RGB12_CYAN 0x00ff
#define RGB12_TURQUOISE 0x04ed
#define RGB12_INDIGO 0x0508
#define RGB12_DARKRED 0x0800
#define RGB12_OLIVE 0x0880
#define RGB12_GRAY 0x0888
#define RGB12_SKYBLUE 0x08df
#define RGB12_BLUEVIOLET 0x093e
#define RGB12_LIGHTGREEN 0x09f9
#define RGB12_DARKVIOLET 0x090d
#define RGB12_YELLOWGREEN 0x0ad3
#define RGB12_BROWN 0x0a33
#define RGB12_DARKGRAY 0x0bbb
#define RGB12_SIENNA 0x0a53
#define RGB12_LIGHTBLUE 0x0bee
#define RGB12_GREENYELLOW 0x0bf3
#define RGB12_SILVER 0x0ccc
#define RGB12_LIGHTGREY 0x0ddd
#define RGB12_LIGHTCYAN 0x0eff
#define RGB12_VIOLET 0x0f8f
#define RGB12_AZUR 0x0fff
#define RGB12_BEIGE 0x0ffe
#define RGB12_MAGENTA 0x0f0f
#define RGB12_TOMATO 0x0f64
#define RGB12_GOLD 0x0fd0
#define RGB12_ORANGE 0x0fa0
#define RGB12_SNOW 0x0fff
#define RGB12_YELLOW 0x0ff0
/* RGB8-332: RRRGGGBB (really not enough color resolution for the following) */
#define RGB8_BLACK 0x00
#define RGB8_WHITE 0xff
#define RGB8_BLUE 0x03
#define RGB8_GREEN 0x1c
#define RGB8_RED 0xe0
#define RGB8_NAVY 0x02
#define RGB8_DARKBLUE 0x02
#define RGB8_DARKGREEN 0x0c
#define RGB8_DARKCYAN 0x16
#define RGB8_CYAN 0x1f
#define RGB8_TURQUOISE 0x5f
#define RGB8_INDIGO 0x62
#define RGB8_DARKRED 0x80
#define RGB8_OLIVE 0x90
#define RGB8_GRAY 0x92
#define RGB8_SKYBLUE 0x9f
#define RGB8_BLUEVIOLET 0xab
#define RGB8_LIGHTGREEN 0xbe
#define RGB8_DARKVIOLET 0x93
#define RGB8_YELLOWGREEN 0x9d
#define RGB8_BROWN 0xa9
#define RGB8_DARKGRAY 0xdb
#define RGB8_SIENNA 0xa9
#define RGB8_LIGHTBLUE 0xdf
#define RGB8_GREENYELLOW 0xdd
#define RGB8_SILVER 0xd9
#define RGB8_LIGHTGREY 0xd9
#define RGB8_LIGHTCYAN 0xff
#define RGB8_VIOLET 0xf3
#define RGB8_AZUR 0xff
#define RGB8_BEIGE 0xff
#define RGB8_MAGENTA 0xed
#define RGB8_TOMATO 0xfc
#define RGB8_GOLD 0xfc
#define RGB8_ORANGE 0xf8
#define RGB8_SNOW 0xff
#define RGB8_YELLOW 0xfc
/****************************************************************************
* Public Data
****************************************************************************/