forked from len0rd/rockbox
Skip initing LCD. Make scroll delay 1s.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@957 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
364f97cc44
commit
14dc57c6d0
1 changed files with 3 additions and 13 deletions
|
|
@ -101,8 +101,6 @@
|
|||
|
||||
/*** generic code ***/
|
||||
|
||||
#define SCROLL_DELAY 10 /* number of "scroll ticks" until scroll starts */
|
||||
|
||||
struct scrollinfo {
|
||||
char text[128];
|
||||
int textlen;
|
||||
|
|
@ -437,15 +435,6 @@ void lcd_init (void)
|
|||
PBCR2 &= 0xff00; /* MD = 00 */
|
||||
PBIOR |= 0x000f; /* IOR = 1 */
|
||||
|
||||
/* Initialize LCD */
|
||||
lcd_write (true, LCD_CNTL_RESET);
|
||||
lcd_write (true, LCD_CNTL_POWER);
|
||||
lcd_write (true, LCD_CNTL_SEGREMAP);
|
||||
lcd_write (true, LCD_CNTL_OUTSCAN);
|
||||
lcd_write (true, LCD_CNTL_CONTRAST);
|
||||
lcd_write (true, 0x20); /* Contrast parameter */
|
||||
lcd_write (true, LCD_CNTL_DISPON);
|
||||
|
||||
lcd_clear_display();
|
||||
lcd_update();
|
||||
create_thread(scroll_thread, scroll_stack, sizeof(scroll_stack));
|
||||
|
|
@ -817,7 +806,8 @@ static void scroll_thread(void)
|
|||
yield();
|
||||
continue;
|
||||
}
|
||||
if ( scroll_count < SCROLL_DELAY )
|
||||
/* wait 1s before starting scroll */
|
||||
if ( scroll_count < scroll_speed )
|
||||
scroll_count++;
|
||||
else {
|
||||
lcd_puts(s->xpos,s->starty,s->text + s->offset);
|
||||
|
|
@ -831,7 +821,7 @@ static void scroll_thread(void)
|
|||
s->offset++;
|
||||
|
||||
if (s->offset > s->textlen) {
|
||||
scroll_count = SCROLL_DELAY; /* prevent wrap */
|
||||
scroll_count = scroll_speed; /* prevent wrap */
|
||||
s->offset=0;
|
||||
s->xpos = s->space;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue