1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Robert E. Hak <rhak@ramapo.edu>
12 * Windows Copyright (C) 2002 by Felix Arends
13 * X11 Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se>
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 ****************************************************************************/
30 #ifdef HAVE_LCD_ENABLE
31 static bool lcd_enabled
= false;
34 static bool lcd_sleeping
= true;
37 void lcd_set_flip(bool yesno
)
42 void lcd_set_invert_display(bool invert
)
47 int lcd_default_contrast(void)
52 #ifdef HAVE_REMOTE_LCD
53 void lcd_remote_set_contrast(int val
)
57 void lcd_remote_backlight_on(int val
)
61 void lcd_remote_backlight_off(int val
)
66 void lcd_remote_set_flip(bool yesno
)
71 void lcd_remote_set_invert_display(bool invert
)
87 send_event(LCD_EVENT_ACTIVATION
, NULL
);
92 #ifdef HAVE_LCD_ENABLE
93 void lcd_enable(bool on
)
95 if (on
&& !lcd_enabled
)
98 /* lcd_awake will handle the activation call */
101 send_event(LCD_EVENT_ACTIVATION
, NULL
);
108 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
109 bool lcd_active(void)
112 #ifdef HAVE_LCD_ENABLE
113 retval
= lcd_enabled
;
115 #ifdef HAVE_LCD_SLEEP
117 retval
= !lcd_sleeping
;
123 #ifdef HAVE_LCD_SHUTDOWN
124 void lcd_shutdown(void)