Contrast settings for the gigabeat F/X
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17590 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7a4d1609ee
commit
4c99f9a749
2 changed files with 21 additions and 5 deletions
|
@ -113,6 +113,13 @@
|
|||
|
||||
#define HAVE_LCD_FLIP
|
||||
|
||||
/* Define this if your LCD can set contrast */
|
||||
#define HAVE_LCD_CONTRAST
|
||||
|
||||
#define MIN_CONTRAST_SETTING 0
|
||||
#define MAX_CONTRAST_SETTING 63
|
||||
#define DEFAULT_CONTRAST_SETTING 47 /* Match boot contrast */
|
||||
|
||||
/* LCD invert - does not currently work */
|
||||
/* #define HAVE_LCD_INVERT */
|
||||
|
||||
|
|
|
@ -310,6 +310,20 @@ void lcd_set_flip(bool yesno) {
|
|||
LCD_SPI_stop();
|
||||
}
|
||||
|
||||
int lcd_default_contrast(void)
|
||||
{
|
||||
return DEFAULT_CONTRAST_SETTING;
|
||||
}
|
||||
|
||||
void lcd_set_contrast(int val) {
|
||||
if (!lcd_on)
|
||||
return;
|
||||
|
||||
LCD_SPI_start();
|
||||
LCD_SPI_setreg(0x0B, (unsigned char) val);
|
||||
LCD_SPI_stop();
|
||||
}
|
||||
|
||||
void lcd_set_invert_display(bool yesno) {
|
||||
if (!lcd_on)
|
||||
return;
|
||||
|
@ -498,8 +512,3 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
|||
}
|
||||
}
|
||||
|
||||
void lcd_set_contrast(int val) {
|
||||
(void) val;
|
||||
// TODO:
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue