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)
28 if (rb
->global_settings
->backlight_timeout
> 0)
29 rb
->backlight_set_timeout(0);
31 if (rb
->global_settings
->backlight_timeout_plugged
> 0)
32 rb
->backlight_set_timeout_plugged(0);
33 #endif /* CONFIG_CHARGING */
36 /* Reset backlight operation to its settings */
37 void backlight_use_settings(void)
39 rb
->backlight_set_timeout(rb
->global_settings
->backlight_timeout
);
41 rb
->backlight_set_timeout_plugged(rb
->global_settings
->
42 backlight_timeout_plugged
);
43 #endif /* CONFIG_CHARGING */
46 #ifdef HAVE_REMOTE_LCD
47 /* Force the backlight on */
48 void remote_backlight_force_on(void)
50 if (rb
->global_settings
->remote_backlight_timeout
> 0)
51 rb
->remote_backlight_set_timeout(0);
53 if (rb
->global_settings
->remote_backlight_timeout_plugged
> 0)
54 rb
->remote_backlight_set_timeout_plugged(0);
55 #endif /* CONFIG_CHARGING */
58 /* Reset backlight operation to its settings */
59 void remote_backlight_use_settings(void)
61 rb
->remote_backlight_set_timeout(rb
->global_settings
->
62 remote_backlight_timeout
);
64 rb
->remote_backlight_set_timeout_plugged(rb
->global_settings
->
65 remote_backlight_timeout_plugged
);
66 #endif /* CONFIG_CHARGING */
68 #endif /* HAVE_REMOTE_LCD */
70 #ifdef HAVE_BUTTON_LIGHT
71 /* Force the buttonlight on */
72 void buttonlight_force_on(void)
74 if (rb
->global_settings
->buttonlight_timeout
> 0)
75 rb
->buttonlight_set_timeout(0);
78 /* Reset buttonlight operation to its settings */
79 void buttonlight_use_settings(void)
81 rb
->buttonlight_set_timeout(rb
->global_settings
->buttonlight_timeout
);
83 #endif /* HAVE_BUTTON_LIGHT */
85 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
86 void backlight_brightness_set(int brightness
)
88 rb
->backlight_set_brightness(brightness
);
91 void backlight_brightness_use_setting(void)
93 rb
->backlight_set_brightness(rb
->global_settings
->brightness
);
95 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */