diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/backlight-thread-fading.h | 46 | ||||
-rw-r--r-- | firmware/export/backlight.h | 8 | ||||
-rw-r--r-- | firmware/export/config-c200.h | 4 | ||||
-rw-r--r-- | firmware/export/config-cowond2.h | 4 | ||||
-rw-r--r-- | firmware/export/config-e200.h | 4 | ||||
-rw-r--r-- | firmware/export/config-h300.h | 5 | ||||
-rw-r--r-- | firmware/export/config-iaudiox5.h | 3 |
7 files changed, 73 insertions, 1 deletions
diff --git a/firmware/export/backlight-thread-fading.h b/firmware/export/backlight-thread-fading.h new file mode 100644 index 0000000000..ca9c195480 --- /dev/null +++ b/firmware/export/backlight-thread-fading.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id:$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Will Robertson | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef BACKLIGHT_THREAD_FADING_H | ||
23 | #define BACKLIGHT_THREAD_FADING_H | ||
24 | |||
25 | #include "config.h" | ||
26 | |||
27 | #ifdef USE_BACKLIGHT_SW_FADING | ||
28 | |||
29 | /* delay supposed to be MAX_BRIGHTNESS_SETTING*2 rounded to the next multiple | ||
30 | * of 5, however not more than 40 */ | ||
31 | #define _FADE_DELAY (((MAX_BRIGHTNESS_SETTING*2+4)/5)*5) | ||
32 | #define FADE_DELAY (HZ/(MIN(_FADE_DELAY, 40))) | ||
33 | |||
34 | void _backlight_fade_update_state(int brightness); | ||
35 | bool _backlight_fade_step(int direction); | ||
36 | |||
37 | /* enum used for both, fading state and fading type selected through the settings */ | ||
38 | |||
39 | enum { | ||
40 | NOT_FADING = 0, | ||
41 | FADING_UP, | ||
42 | FADING_DOWN, | ||
43 | }; | ||
44 | #endif /* USE_BACKLIGHT_SW_FADING */ | ||
45 | |||
46 | #endif /* _BACKLIGHT_THREAD_FADING_ */ | ||
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h index e0980658dc..a177fe740f 100644 --- a/firmware/export/backlight.h +++ b/firmware/export/backlight.h | |||
@@ -34,10 +34,16 @@ void backlight_close(void); | |||
34 | 34 | ||
35 | int backlight_get_current_timeout(void); | 35 | int backlight_get_current_timeout(void); |
36 | 36 | ||
37 | #ifdef HAVE_BACKLIGHT_PWM_FADING | 37 | #if defined(HAVE_BACKLIGHT_PWM_FADING) |
38 | void backlight_set_fade_in(int value); | 38 | void backlight_set_fade_in(int value); |
39 | void backlight_set_fade_out(int value); | 39 | void backlight_set_fade_out(int value); |
40 | #endif | 40 | #endif |
41 | #ifdef USE_BACKLIGHT_SW_FADING | ||
42 | void backlight_set_fade_in(bool value); | ||
43 | void backlight_set_fade_out(bool value); | ||
44 | #endif | ||
45 | |||
46 | extern int backlight_brightness; | ||
41 | 47 | ||
42 | void backlight_set_timeout_plugged(int value); | 48 | void backlight_set_timeout_plugged(int value); |
43 | 49 | ||
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h index a96b9c7ef8..8e26585e94 100644 --- a/firmware/export/config-c200.h +++ b/firmware/export/config-c200.h | |||
@@ -132,6 +132,10 @@ | |||
132 | /** Non-simulator section **/ | 132 | /** Non-simulator section **/ |
133 | #ifndef SIMULATOR | 133 | #ifndef SIMULATOR |
134 | 134 | ||
135 | /* define this if the backlight thread is used for fade, not for sim, needs | ||
136 | * HAVE_BACKLIGHT_BRIGHTNESS */ | ||
137 | #define USE_BACKLIGHT_SW_FADING | ||
138 | |||
135 | /* Define this if you have a PortalPlayer PP5024 */ | 139 | /* Define this if you have a PortalPlayer PP5024 */ |
136 | #define CONFIG_CPU PP5022 | 140 | #define CONFIG_CPU PP5022 |
137 | 141 | ||
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h index fd696aae66..b723201340 100644 --- a/firmware/export/config-cowond2.h +++ b/firmware/export/config-cowond2.h | |||
@@ -122,6 +122,10 @@ | |||
122 | 122 | ||
123 | #ifndef SIMULATOR | 123 | #ifndef SIMULATOR |
124 | 124 | ||
125 | /* define this if the backlight thread is used for fade, not for sim, needs | ||
126 | * HAVE_BACKLIGHT_BRIGHTNESS */ | ||
127 | #define USE_BACKLIGHT_SW_FADING | ||
128 | |||
125 | /* Define this if you have a TCC7801 */ | 129 | /* Define this if you have a TCC7801 */ |
126 | #define CONFIG_CPU TCC7801 | 130 | #define CONFIG_CPU TCC7801 |
127 | 131 | ||
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h index 075f490ee4..d9bebef9bc 100644 --- a/firmware/export/config-e200.h +++ b/firmware/export/config-e200.h | |||
@@ -129,6 +129,10 @@ | |||
129 | /** Non-simulator section **/ | 129 | /** Non-simulator section **/ |
130 | #ifndef SIMULATOR | 130 | #ifndef SIMULATOR |
131 | 131 | ||
132 | /* define this if the backlight thread is used for fade, not for sim, needs | ||
133 | * HAVE_BACKLIGHT_BRIGHTNESS */ | ||
134 | #define USE_BACKLIGHT_SW_FADING | ||
135 | |||
132 | /* Define this if you have a PortalPlayer PP5024 */ | 136 | /* Define this if you have a PortalPlayer PP5024 */ |
133 | #define CONFIG_CPU PP5024 | 137 | #define CONFIG_CPU PP5024 |
134 | 138 | ||
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h index f45b694fe0..2af426f048 100644 --- a/firmware/export/config-h300.h +++ b/firmware/export/config-h300.h | |||
@@ -114,6 +114,11 @@ | |||
114 | 114 | ||
115 | #ifndef SIMULATOR | 115 | #ifndef SIMULATOR |
116 | 116 | ||
117 | /* define this if the backlight thread is used for fade, not for sim, needs | ||
118 | * HAVE_BACKLIGHT_BRIGHTNESS */ | ||
119 | #define USE_BACKLIGHT_SW_FADING | ||
120 | |||
121 | |||
117 | /* Define this if your LCD can be enabled/disabled */ | 122 | /* Define this if your LCD can be enabled/disabled */ |
118 | #define HAVE_LCD_ENABLE | 123 | #define HAVE_LCD_ENABLE |
119 | 124 | ||
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h index cdae55af4f..089d219534 100644 --- a/firmware/export/config-iaudiox5.h +++ b/firmware/export/config-iaudiox5.h | |||
@@ -124,6 +124,9 @@ | |||
124 | 124 | ||
125 | #ifndef SIMULATOR | 125 | #ifndef SIMULATOR |
126 | 126 | ||
127 | /* define this if the backlight thread is used for fade, not for sim */ | ||
128 | #define USE_BACKLIGHT_SW_FADING | ||
129 | |||
127 | /* Define this if your LCD can set contrast */ | 130 | /* Define this if your LCD can set contrast */ |
128 | #define HAVE_LCD_CONTRAST | 131 | #define HAVE_LCD_CONTRAST |
129 | 132 | ||