A bit of cleanup in config-fuze (don't define features we do not have yet), a bit of reordering. Cleanup in the lcd driver. Reintroduce the delay in the dbop read function, as it helps avoiding heavy hold button weirdness when boosted

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20583 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-03-30 19:57:42 +00:00
parent a56cba52bd
commit 487d78995a
3 changed files with 37 additions and 54 deletions

View file

@ -133,6 +133,12 @@ bool button_hold(void)
return hold_button;
}
static void button_delay(void)
{
int i = 32;
while(i--);
}
static short button_dbop(void)
{
/* skip home and power reading if lcd_button_support was blocked,
@ -153,6 +159,8 @@ static short button_dbop(void)
DBOP_TIMPOL_01 = 0xe167e167;
DBOP_TIMPOL_23 = 0xe167006e;
button_delay();
DBOP_CTRL |= (1<<15); /* start read */
while((DBOP_STAT & (1<<16)) == 0); /* wait for valid data */

View file

@ -44,7 +44,7 @@ static int xoffset = 20; /* needed for flip */
/* we need to write a red pixel for correct button reads
* (see lcd_button_support()), but that must not happen while the lcd is updating
* so block lcd_button_support the during updates */
static volatile bool lcd_busy = false;
static bool lcd_busy = false;
static void as3525_dbop_init(void)
{
@ -108,32 +108,13 @@ static void lcd_write_reg(int reg, int value)
lcd_write_data(&data, 1);
}
/*** hardware configuration ***/
void lcd_set_contrast(int val)
{
(void)val;
}
void lcd_set_invert_display(bool yesno)
{
(void)yesno;
}
static void flip_lcd(bool yesno)
{
(void)yesno;
}
/* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno)
{
display_flipped = yesno;
xoffset = yesno ? 0 : 20; /* TODO: Implement flipped mode */
if (display_on)
flip_lcd(yesno);
/* TODO */
}
@ -355,7 +336,8 @@ bool lcd_button_support(void)
lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ);
/* Set start position and window */
lcd_window_x(-1, 1);
lcd_window_x(-1, 0);
lcd_window_y(-1, 0);
lcd_write_cmd(R_WRITE_DATA_2_GRAM);
lcd_write_data(&data, 1);