Add a note about Rockbox not running on Sansas v2 (FS#8477 by Marc Guay).
[Rockbox.git] / firmware / export / backlight.h
blob3ee46c14858117af9665d3fbd267a63ae0eb54e6
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Daniel Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef BACKLIGHT_H
20 #define BACKLIGHT_H
22 #include "config.h"
24 bool is_backlight_on(void);
25 void backlight_on(void);
26 void backlight_off(void);
27 void backlight_set_timeout(int value);
29 #ifdef HAVE_BACKLIGHT
30 void backlight_init(void);
32 int backlight_get_current_timeout(void);
34 #ifdef HAVE_BACKLIGHT_PWM_FADING
35 void backlight_set_fade_in(int value);
36 void backlight_set_fade_out(int value);
37 #endif
39 void backlight_set_timeout_plugged(int value);
41 #ifdef HAS_BUTTON_HOLD
42 void backlight_hold_changed(bool hold_button);
43 void backlight_set_on_button_hold(int index);
44 #endif
46 #ifdef HAVE_LCD_SLEEP
47 void lcd_set_sleep_after_backlight_off(int index);
48 extern const signed char lcd_sleep_timeout_value[];
49 #endif
51 #else /* !HAVE_BACKLIGHT */
52 #define backlight_init()
53 #endif /* !HAVE_BACKLIGHT */
55 #ifdef HAVE_REMOTE_LCD
56 void remote_backlight_on(void);
57 void remote_backlight_off(void);
58 void remote_backlight_set_timeout(int value);
59 void remote_backlight_set_timeout_plugged(int value);
60 bool is_remote_backlight_on(void);
62 #ifdef HAS_REMOTE_BUTTON_HOLD
63 void remote_backlight_hold_changed(bool rc_hold_button);
64 void remote_backlight_set_on_button_hold(int index);
65 #endif
66 #endif /* HAVE_REMOTE_LCD */
68 #ifdef SIMULATOR
69 void sim_backlight(int value);
70 void sim_remote_backlight(int value);
71 #endif
73 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
74 void backlight_set_brightness(int val);
75 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */
77 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
78 void buttonlight_set_brightness(int val);
79 #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */
81 #ifdef HAVE_BUTTON_LIGHT
82 void buttonlight_on(void);
83 void buttonlight_off(void);
84 void buttonlight_set_timeout(int value);
85 #endif
87 /* Private API for use in target tree backlight code only */
88 #ifdef HAVE_BUTTON_LIGHT
89 extern int _buttonlight_timeout;
90 #endif
91 #ifdef HAVE_LCD_SLEEP
92 extern int _lcd_sleep_timer;
93 extern int _lcd_sleep_timeout;
94 #endif
96 #endif /* BACKLIGHT_H */