Convert lcd_activation callbacks to use the event system to allow for multiple parallel callbacks (for custom statusbar).

Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing).
Removed corresponding functions from the core and plugin api. Bump min version and sort.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-10-20 21:54:59 +00:00
parent 774bacc692
commit d85c3ec410
32 changed files with 57 additions and 117 deletions

View file

@ -172,7 +172,7 @@ void lcd_enable(bool enable)
ascodec_write(AS3514_DCDC15, 1);
lcd_write_command(LCD_SET_DISPLAY_ON);
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else {
lcd_write_command(LCD_SET_DISPLAY_OFF);

View file

@ -372,7 +372,7 @@ void lcd_enable(bool on)
if(on)
{
_display_on();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -217,7 +217,7 @@ void lcd_enable(bool on)
lcd_write_reg(0x07, 0x17);
display_on = true;
lcd_update(); /* Resync display */
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
sleep(0);
}

View file

@ -122,7 +122,7 @@ void lcd_enable(bool state)
lcd_powered = true;
lcd_on = true;
lcd_update();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -618,7 +618,7 @@ void lcd_awake(void)
tick_add_task(&lcd_tick);
wakeup_wait(&(lcd_state.initwakeup), TIMEOUT_BLOCK);
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
}

View file

@ -380,7 +380,7 @@ void lcd_enable(bool on)
/* Probably out of sync and we don't wanna pepper the code with
lcd_update() calls for this. */
lcd_update();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -320,7 +320,7 @@ void lcd_enable(bool yesno)
{
lcd_send_command(R_STANDBY_OFF, 0);
lcd_send_command(R_DISPLAY_ON, 0);
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -339,7 +339,7 @@ void lcd_enable(bool on)
/* Probably out of sync and we don't wanna pepper the code with
lcd_update() calls for this. */
lcd_update();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -323,7 +323,7 @@ void lcd_enable(bool state)
lcd_on = true;
lcd_update();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -226,7 +226,7 @@ void lcd_enable(bool yesno)
{
lcd_send_command(R_STANDBY_OFF);
lcd_send_command(R_DISPLAY_ON);
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -492,7 +492,7 @@ void lcd_enable(bool on)
/* Probably out of sync and we don't wanna pepper the code with
lcd_update() calls for this. */
lcd_update();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -448,7 +448,7 @@ void lcd_enable(bool on)
DEV_EN |= DEV_LCD; /* Enable LCD controller */
lcd_display_on(); /* Turn on display */
lcd_update(); /* Resync display */
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
LCD_REG_6 |= 1; /* Restart DMA */
sleep(HZ/50); /* Wait for a frame to be written */
}

View file

@ -143,7 +143,7 @@ void lcd_enable(bool on)
if (on) {
_display_on();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
} else {
/** Off sequence according to datasheet, p. 130 **/
lcd_write_reg(R_FRAME_CYCLE_CONTROL, 0x0002); /* EQ=0, 18 clks/line */

View file

@ -209,7 +209,7 @@ void lcd_enable(bool on)
lcd_display_on();
LCDC_CTRL |= 1; /* controller enable */
lcd_update(); /* Resync display */
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -237,7 +237,7 @@ return;
{
lcd_display_on(false); /* Turn on display */
lcd_update(); /* Resync display */
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -98,7 +98,7 @@ void lcd_awake(void)
sleep(HZ/10);
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
}
#endif

View file

@ -397,7 +397,7 @@ void lcd_enable(bool on)
/* Probably out of sync and we don't wanna pepper the code with
lcd_update() calls for this. */
lcd_update();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -280,7 +280,7 @@ void lcd_enable(bool on)
if (on)
{
_display_on();
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
}
else
{

View file

@ -55,7 +55,7 @@ void lcd_enable(bool state)
{
lcd_on();
#ifdef HAVE_LCD_ENABLE
lcd_activation_call_hook();
send_event(LCD_EVENT_ACTIVATION, NULL);
#endif
}
else