Add SD1329 init logic

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2665 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2010-05-12 03:08:26 +00:00
parent 58d04d869a
commit f4b2cc410e
3 changed files with 387 additions and 91 deletions
+372 -80
View File
File diff suppressed because it is too large Load Diff
+14 -10
View File
@@ -108,7 +108,8 @@
* A[0] = 1, Enable doubling the Second Pre-charge speed
*/
#define SSD1329_PRECHRG2_SPEED 0x82
#define SSD1329_PRECHRG2_SPEED 0x82
# define SSD1329_PRECHRG2_DBL 0x01
/* Set Master Icon Control
*
@@ -180,10 +181,10 @@
* This double byte command is used to set the ON / OFF status of all 64 icons.
*
* Byte 1: 0x94
* Byte 2: A[7:6]: OFF/ON/BLINK (Same as 0x93
* Byte 2: A[7:6]: OFF/ON/BLINK (Same as 0x93)
*/
#define SSD1329_ICON_REGISTER 0x94
#define SSD1329_ICON_ALL 0x94
/* Set Icon Blinking Cycle
*
@@ -377,7 +378,7 @@
* A[7:4]: Phase 2 period of 1~16 DCLKs
*/
#define SSD1329_RESET 0xb1
#define SSD1329_PHASE_LENGTH 0xb1
/* Set Frame Frequency
*
@@ -387,7 +388,7 @@
*
* Byte 1: 0xb2
* Byte 2: A[6:0]:Total number of DCLKs per row. Ranging from
0x14hto 0x4e DCLKs. frame Frequency = DCLK freq /A[6:0].
* 0x14 to 0x4e DCLKs. frame Frequency = DCLK freq /A[6:0].
*/
#define SSD1329_FRAME_FREQ 0xb2
@@ -405,9 +406,10 @@
* Byte 1: 0xb3
* Byte 2: A[3:0]: Define divide ratio (D) of display clock (DCLK)
* Divide ratio=A[3:0]+1
* A[7:4] : Set the Oscillator Frequency, FOSC. Range:0-15
*/
#define SSD1329_DIV_RATIO 0xb3
#define SSD1329_DCLK_DIV 0xb3
/* Set Default Gray Scale Table
*
@@ -415,7 +417,6 @@
* default setting.
*
* Byte 1: 0xb7
* Byte 2: A[7:4] : Set the Oscillator Frequency, FOSC. Range:0-15
*/
#define SSD1329_GSCALE_TABLE 0xb7
@@ -438,7 +439,7 @@
* Bytes 2-16: An[5:0], value for GSn level Pulse width
*/
#define SSD1329_GSCALE_SET 0xb8
#define SSD1329_GSCALE_LOOKUP 0xb8
/* Set Second Pre-charge Period
*
@@ -490,10 +491,13 @@
* This command is used to lock the MCU from accepting any command.
*
* Byte 1: 0xfd
* Byte 2: A[2] == 1, Enable locking the MCU from entering command
* Byte 2: 0x12 | A[2]
* A[2] == 1, Enable locking the MCU from entering command
*/
#define SSD1329_CMD_LOCK 0xfd
#define SSD1329_CMD_LOCK 0xfd
# define SSD1329_LOCK_ON 0x13
# define SSD1329_LOCK_OFF 0x12
/* SD1329 Status ************************************************************/
+1 -1
View File
@@ -355,7 +355,7 @@ static int skel_getcontrast(struct lcd_dev_s *dev)
}
/**************************************************************************************
* Name: skel_getcontrast
* Name: skel_setcontrast
*
* Description:
* Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST).