mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
Fix very last yellows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20337 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d0e834aa73
commit
5c16ba4c4d
2 changed files with 58 additions and 54 deletions
|
|
@ -39,7 +39,9 @@ static int lcd_contrast;
|
||||||
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
|
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
||||||
static void lcd_display_off(void);
|
static void lcd_display_off(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* register defines for the Renesas HD66773R */
|
/* register defines for the Renesas HD66773R */
|
||||||
#define R_START_OSC 0x00
|
#define R_START_OSC 0x00
|
||||||
|
|
@ -314,7 +316,7 @@ void lcd_sleep(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_LCD_ENABLE)
|
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
||||||
static void lcd_display_off(void)
|
static void lcd_display_off(void)
|
||||||
{
|
{
|
||||||
display_on = false;
|
display_on = false;
|
||||||
|
|
@ -337,6 +339,9 @@ static void lcd_display_off(void)
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0000);
|
lcd_write_reg(R_DISP_CONTROL, 0x0000);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_ENABLE)
|
||||||
static void lcd_display_on(void)
|
static void lcd_display_on(void)
|
||||||
{
|
{
|
||||||
/* Be sure power is on first */
|
/* Be sure power is on first */
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,6 @@ static unsigned short r_gate_scan_start_pos = 0x0002;
|
||||||
static unsigned short r_drv_output_control = 0x0313;
|
static unsigned short r_drv_output_control = 0x0313;
|
||||||
static unsigned short r_horiz_ram_addr_pos = 0x7f00;
|
static unsigned short r_horiz_ram_addr_pos = 0x7f00;
|
||||||
|
|
||||||
/* Forward declarations */
|
|
||||||
static void lcd_display_off(void);
|
|
||||||
|
|
||||||
/* A15(0x8000) && CS1->CS, A1(0x0002)->RS */
|
/* A15(0x8000) && CS1->CS, A1(0x0002)->RS */
|
||||||
#define LCD_CMD *(volatile unsigned short *)0xf0008000
|
#define LCD_CMD *(volatile unsigned short *)0xf0008000
|
||||||
#define LCD_DATA *(volatile unsigned short *)0xf0008002
|
#define LCD_DATA *(volatile unsigned short *)0xf0008002
|
||||||
|
|
@ -267,6 +264,58 @@ static void lcd_power_on(void)
|
||||||
power_on = true;
|
power_on = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void lcd_display_on(void)
|
||||||
|
{
|
||||||
|
/* Be sure power is on first */
|
||||||
|
if (!power_on)
|
||||||
|
lcd_power_on();
|
||||||
|
|
||||||
|
/** Display ON Sequence **/
|
||||||
|
/* Per datasheet Rev.1.10, Jun.21.2003, p. 97 */
|
||||||
|
|
||||||
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=01 */
|
||||||
|
lcd_write_reg(R_DISP_CONTROL, 0x0001);
|
||||||
|
|
||||||
|
sleep(HZ/25); /* Wait 2 frames or more */
|
||||||
|
|
||||||
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=01 */
|
||||||
|
lcd_write_reg(R_DISP_CONTROL, 0x0021 | r_disp_control_rev);
|
||||||
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=11 */
|
||||||
|
lcd_write_reg(R_DISP_CONTROL, 0x0023 | r_disp_control_rev);
|
||||||
|
|
||||||
|
sleep(HZ/25); /* Wait 2 frames or more */
|
||||||
|
|
||||||
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=1, REV=x, D1-0=11 */
|
||||||
|
lcd_write_reg(R_DISP_CONTROL, 0x0033 | r_disp_control_rev);
|
||||||
|
|
||||||
|
display_on = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
||||||
|
static void lcd_display_off(void)
|
||||||
|
{
|
||||||
|
display_on = false;
|
||||||
|
|
||||||
|
/** Display OFF sequence **/
|
||||||
|
/* Per datasheet Rev.1.10, Jun.21.2003, p. 97 */
|
||||||
|
|
||||||
|
/* EQ1-0=00 already */
|
||||||
|
|
||||||
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=1, REV=x, D1-0=10 */
|
||||||
|
lcd_write_reg(R_DISP_CONTROL, 0x0032 | r_disp_control_rev);
|
||||||
|
|
||||||
|
sleep(HZ/25); /* Wait 2 frames or more */
|
||||||
|
|
||||||
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=10 */
|
||||||
|
lcd_write_reg(R_DISP_CONTROL, 0x0022 | r_disp_control_rev);
|
||||||
|
|
||||||
|
sleep(HZ/25); /* Wait 2 frames or more */
|
||||||
|
|
||||||
|
/* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */
|
||||||
|
lcd_write_reg(R_DISP_CONTROL, 0x0000);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_LCD_SLEEP)
|
#if defined(HAVE_LCD_SLEEP)
|
||||||
static void lcd_power_off(void)
|
static void lcd_power_off(void)
|
||||||
{
|
{
|
||||||
|
|
@ -307,56 +356,6 @@ void lcd_sleep(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void lcd_display_on(void)
|
|
||||||
{
|
|
||||||
/* Be sure power is on first */
|
|
||||||
if (!power_on)
|
|
||||||
lcd_power_on();
|
|
||||||
|
|
||||||
/** Display ON Sequence **/
|
|
||||||
/* Per datasheet Rev.1.10, Jun.21.2003, p. 97 */
|
|
||||||
|
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=01 */
|
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0001);
|
|
||||||
|
|
||||||
sleep(HZ/25); /* Wait 2 frames or more */
|
|
||||||
|
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=01 */
|
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0021 | r_disp_control_rev);
|
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=11 */
|
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0023 | r_disp_control_rev);
|
|
||||||
|
|
||||||
sleep(HZ/25); /* Wait 2 frames or more */
|
|
||||||
|
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=1, REV=x, D1-0=11 */
|
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0033 | r_disp_control_rev);
|
|
||||||
|
|
||||||
display_on = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lcd_display_off(void)
|
|
||||||
{
|
|
||||||
display_on = false;
|
|
||||||
|
|
||||||
/** Display OFF sequence **/
|
|
||||||
/* Per datasheet Rev.1.10, Jun.21.2003, p. 97 */
|
|
||||||
|
|
||||||
/* EQ1-0=00 already */
|
|
||||||
|
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=1, REV=x, D1-0=10 */
|
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0032 | r_disp_control_rev);
|
|
||||||
|
|
||||||
sleep(HZ/25); /* Wait 2 frames or more */
|
|
||||||
|
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=10 */
|
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0022 | r_disp_control_rev);
|
|
||||||
|
|
||||||
sleep(HZ/25); /* Wait 2 frames or more */
|
|
||||||
|
|
||||||
/* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */
|
|
||||||
lcd_write_reg(R_DISP_CONTROL, 0x0000);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* LCD init */
|
/* LCD init */
|
||||||
void lcd_init_device(void)
|
void lcd_init_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue