Enable lcd contrast adjustment on Sansa c200

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14945 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Mark Arigo 2007-10-02 02:00:40 +00:00
parent b11b4704b9
commit f463a44adf
2 changed files with 10 additions and 10 deletions

View file

@ -58,11 +58,11 @@
/* TODO: #define HAVE_LCD_INVERT */
/* Define this if your LCD can set contrast */
/* #define HAVE_LCD_CONTRAST */
#define HAVE_LCD_CONTRAST
#define MIN_CONTRAST_SETTING 0
#define MAX_CONTRAST_SETTING 30
#define DEFAULT_CONTRAST_SETTING 14 /* Match boot contrast */
#define MAX_CONTRAST_SETTING 255
#define DEFAULT_CONTRAST_SETTING 85
/* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */

View file

@ -5,7 +5,7 @@
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id:$
* $Id$
*
* Copyright (C) 2007 by Mark Arigo
*
@ -180,21 +180,21 @@ int lcd_default_contrast(void)
void lcd_set_contrast(int val)
{
/* TODO: Implement lcd_set_contrast() */
(void)val;
lcd_send_command(R_CONTRAST_CONTROL1);
lcd_send_command(val);
}
void lcd_set_invert_display(bool yesno)
{
/* TODO: Implement lcd_set_invert_display() */
(void)yesno;
/* TODO: Implement lcd_set_invert_display() */
(void)yesno;
}
/* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno)
{
lcd_send_command(R_DRIVER_OUTPUT_MODE);
lcd_send_command(yesno ? 0x02 : 0x07);
lcd_send_command(R_DRIVER_OUTPUT_MODE);
lcd_send_command(yesno ? 0x02 : 0x07);
}
/*** update functions ***/