1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 by Peter D'Hoye
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 ****************************************************************************/
25 /* Force the backlight on */
26 void backlight_force_on(void)
30 if (rb
->global_settings
->backlight_timeout
> 0)
31 rb
->backlight_set_timeout(0);
33 if (rb
->global_settings
->backlight_timeout_plugged
> 0)
34 rb
->backlight_set_timeout_plugged(0);
35 #endif /* CONFIG_CHARGING */
38 /* Reset backlight operation to its settings */
39 void backlight_use_settings(void)
43 rb
->backlight_set_timeout(rb
->global_settings
->backlight_timeout
);
45 rb
->backlight_set_timeout_plugged(rb
->global_settings
->
46 backlight_timeout_plugged
);
47 #endif /* CONFIG_CHARGING */
50 #ifdef HAVE_REMOTE_LCD
51 /* Force the backlight on */
52 void remote_backlight_force_on(void)
56 if (rb
->global_settings
->remote_backlight_timeout
> 0)
57 rb
->remote_backlight_set_timeout(0);
59 if (rb
->global_settings
->remote_backlight_timeout_plugged
> 0)
60 rb
->remote_backlight_set_timeout_plugged(0);
61 #endif /* CONFIG_CHARGING */
64 /* Reset backlight operation to its settings */
65 void remote_backlight_use_settings(void)
69 rb
->remote_backlight_set_timeout(rb
->global_settings
->
70 remote_backlight_timeout
);
72 rb
->remote_backlight_set_timeout_plugged(rb
->global_settings
->
73 remote_backlight_timeout_plugged
);
74 #endif /* CONFIG_CHARGING */
76 #endif /* HAVE_REMOTE_LCD */
78 #ifdef HAVE_BUTTON_LIGHT
79 /* Force the buttonlight on */
80 void buttonlight_force_on(void)
84 if (rb
->global_settings
->buttonlight_timeout
> 0)
85 rb
->buttonlight_set_timeout(0);
88 /* Reset buttonlight operation to its settings */
89 void buttonlight_use_settings(void)
93 rb
->buttonlight_set_timeout(rb
->global_settings
->buttonlight_timeout
);
95 #endif /* HAVE_BUTTON_LIGHT */
97 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
98 void backlight_brightness_set(int brightness
)
102 rb
->backlight_set_brightness(brightness
);
105 void backlight_brightness_use_setting(void)
109 rb
->backlight_set_brightness(rb
->global_settings
->brightness
);
111 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */