mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Enable display contrast setting and implement flip for the Clip.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19219 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a091d20ba0
commit
3e965fd6c3
2 changed files with 18 additions and 3 deletions
|
|
@ -61,6 +61,13 @@
|
||||||
/* define this if you can flip your LCD */
|
/* define this if you can flip your LCD */
|
||||||
#define HAVE_LCD_FLIP
|
#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 50
|
||||||
|
#define DEFAULT_CONTRAST_SETTING 30
|
||||||
|
|
||||||
/* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */
|
/* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */
|
||||||
|
|
||||||
#define CONFIG_KEYPAD SANSA_CLIP_PAD
|
#define CONFIG_KEYPAD SANSA_CLIP_PAD
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ static bool display_on; /* used by lcd_enable */
|
||||||
|
|
||||||
int lcd_default_contrast(void)
|
int lcd_default_contrast(void)
|
||||||
{
|
{
|
||||||
return 0x1f;
|
return DEFAULT_CONTRAST_SETTING;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_set_contrast(int val)
|
void lcd_set_contrast(int val)
|
||||||
|
|
@ -143,8 +143,16 @@ void lcd_set_invert_display(bool yesno)
|
||||||
/* turn the display upside down (call lcd_update() afterwards) */
|
/* turn the display upside down (call lcd_update() afterwards) */
|
||||||
void lcd_set_flip(bool yesno)
|
void lcd_set_flip(bool yesno)
|
||||||
{
|
{
|
||||||
(void)yesno;
|
if (yesno)
|
||||||
/* TODO */
|
{
|
||||||
|
lcd_write_command(LCD_SET_SEGMENT_REMAP);
|
||||||
|
lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lcd_write_command(LCD_SET_SEGMENT_REMAP_INV);
|
||||||
|
lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION_INV);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_enable(bool enable)
|
void lcd_enable(bool enable)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue