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 ***/
|
/*** generic code ***/
|
||||||
|
|
||||||
#define SCROLL_DELAY 10 /* number of "scroll ticks" until scroll starts */
|
|
||||||
|
|
||||||
struct scrollinfo {
|
struct scrollinfo {
|
||||||
char text[128];
|
char text[128];
|
||||||
int textlen;
|
int textlen;
|
||||||
|
|
@ -437,15 +435,6 @@ void lcd_init (void)
|
||||||
PBCR2 &= 0xff00; /* MD = 00 */
|
PBCR2 &= 0xff00; /* MD = 00 */
|
||||||
PBIOR |= 0x000f; /* IOR = 1 */
|
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_clear_display();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
create_thread(scroll_thread, scroll_stack, sizeof(scroll_stack));
|
create_thread(scroll_thread, scroll_stack, sizeof(scroll_stack));
|
||||||
|
|
@ -817,7 +806,8 @@ static void scroll_thread(void)
|
||||||
yield();
|
yield();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( scroll_count < SCROLL_DELAY )
|
/* wait 1s before starting scroll */
|
||||||
|
if ( scroll_count < scroll_speed )
|
||||||
scroll_count++;
|
scroll_count++;
|
||||||
else {
|
else {
|
||||||
lcd_puts(s->xpos,s->starty,s->text + s->offset);
|
lcd_puts(s->xpos,s->starty,s->text + s->offset);
|
||||||
|
|
@ -831,7 +821,7 @@ static void scroll_thread(void)
|
||||||
s->offset++;
|
s->offset++;
|
||||||
|
|
||||||
if (s->offset > s->textlen) {
|
if (s->offset > s->textlen) {
|
||||||
scroll_count = SCROLL_DELAY; /* prevent wrap */
|
scroll_count = scroll_speed; /* prevent wrap */
|
||||||
s->offset=0;
|
s->offset=0;
|
||||||
s->xpos = s->space;
|
s->xpos = s->space;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue