1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Daniel Stenberg
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
28 #if !defined(BOOTLOADER)
29 /* The whole driver should be built */
30 #define BACKLIGHT_FULL_INIT
33 bool is_backlight_on(bool ignore_always_off
);
34 void backlight_on(void);
35 void backlight_off(void);
36 void backlight_set_timeout(int value
);
39 void backlight_init(void);
40 void backlight_close(void);
42 int backlight_get_current_timeout(void);
44 #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
45 void backlight_set_fade_in(int value
);
46 void backlight_set_fade_out(int value
);
47 #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
48 void backlight_set_fade_in(bool value
);
49 void backlight_set_fade_out(bool value
);
52 void backlight_set_timeout_plugged(int value
);
54 #ifdef HAS_BUTTON_HOLD
55 void backlight_hold_changed(bool hold_button
);
56 void backlight_set_on_button_hold(int index
);
59 #if defined(HAVE_LCD_SLEEP) && defined(HAVE_LCD_SLEEP_SETTING)
60 void lcd_set_sleep_after_backlight_off(int index
);
63 #else /* !HAVE_BACKLIGHT */
64 #define backlight_init()
65 #endif /* !HAVE_BACKLIGHT */
67 #ifdef HAVE_REMOTE_LCD
68 void remote_backlight_on(void);
69 void remote_backlight_off(void);
70 void remote_backlight_set_timeout(int value
);
71 void remote_backlight_set_timeout_plugged(int value
);
72 bool is_remote_backlight_on(bool ignore_always_off
);
73 int remote_backlight_get_current_timeout(void);
75 #ifdef HAS_REMOTE_BUTTON_HOLD
76 void remote_backlight_hold_changed(bool rc_hold_button
);
77 void remote_backlight_set_on_button_hold(int index
);
79 #endif /* HAVE_REMOTE_LCD */
82 void sim_backlight(int value
);
83 void sim_remote_backlight(int value
);
86 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
87 #ifdef BACKLIGHT_FULL_INIT
88 extern int backlight_brightness
;
90 #define backlight_brightness DEFAULT_BRIGHTNESS_SETTING
92 void backlight_set_brightness(int val
);
93 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */
95 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
96 void buttonlight_set_brightness(int val
);
97 #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */
99 #ifdef HAVE_BUTTON_LIGHT
100 void buttonlight_on(void);
101 void buttonlight_off(void);
102 void buttonlight_set_timeout(int value
);
105 /* Private API for use in target tree backlight code only */
106 #ifdef HAVE_BUTTON_LIGHT
107 int buttonlight_get_current_timeout(void);
110 #endif /* BACKLIGHT_H */