summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/backlight-sw-fading.h5
-rw-r--r--firmware/export/backlight.h6
-rw-r--r--firmware/export/config-c200.h21
-rw-r--r--firmware/export/config-c200v2.h6
-rw-r--r--firmware/export/config-cowond2.h10
-rw-r--r--firmware/export/config-e200.h9
-rw-r--r--firmware/export/config-e200v2.h21
-rw-r--r--firmware/export/config-fuze.h21
-rw-r--r--firmware/export/config-gigabeat-s.h5
-rw-r--r--firmware/export/config-h100.h2
-rw-r--r--firmware/export/config-h120.h2
-rw-r--r--firmware/export/config-h300.h8
-rw-r--r--firmware/export/config-iaudiox5.h8
-rw-r--r--firmware/export/config-ipodmini.h2
-rw-r--r--firmware/export/config-ipodmini2g.h2
-rw-r--r--firmware/export/config-ipodnano.h5
-rw-r--r--firmware/export/config-ipodvideo.h5
-rw-r--r--firmware/export/config-mrobe100.h2
-rwxr-xr-xfirmware/export/config-sa9200.h3
-rw-r--r--firmware/export/config.h51
20 files changed, 100 insertions, 94 deletions
diff --git a/firmware/export/backlight-sw-fading.h b/firmware/export/backlight-sw-fading.h
index 54f732709a..8527fd0f99 100644
--- a/firmware/export/backlight-sw-fading.h
+++ b/firmware/export/backlight-sw-fading.h
@@ -22,10 +22,6 @@
22#ifndef BACKLIGHT_THREAD_FADING_H 22#ifndef BACKLIGHT_THREAD_FADING_H
23#define BACKLIGHT_THREAD_FADING_H 23#define BACKLIGHT_THREAD_FADING_H
24 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 25/* delay supposed to be MAX_BRIGHTNESS_SETTING*2 rounded to the next multiple
30 * of 5, however not more than 40 */ 26 * of 5, however not more than 40 */
31#define _FADE_DELAY (((MAX_BRIGHTNESS_SETTING*2+4)/5)*5) 27#define _FADE_DELAY (((MAX_BRIGHTNESS_SETTING*2+4)/5)*5)
@@ -41,6 +37,5 @@ enum {
41 FADING_UP, 37 FADING_UP,
42 FADING_DOWN, 38 FADING_DOWN,
43}; 39};
44#endif /* USE_BACKLIGHT_SW_FADING */
45 40
46#endif /* _BACKLIGHT_THREAD_FADING_ */ 41#endif /* _BACKLIGHT_THREAD_FADING_ */
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h
index cb081a5301..f215e0faea 100644
--- a/firmware/export/backlight.h
+++ b/firmware/export/backlight.h
@@ -34,12 +34,10 @@ void backlight_close(void);
34 34
35int backlight_get_current_timeout(void); 35int backlight_get_current_timeout(void);
36 36
37#if defined(HAVE_BACKLIGHT_PWM_FADING) 37#if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
38void backlight_set_fade_in(int value); 38void backlight_set_fade_in(int value);
39void backlight_set_fade_out(int value); 39void backlight_set_fade_out(int value);
40#endif 40#elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
41#if defined(USE_BACKLIGHT_SW_FADING) \
42 || defined(USE_BACKLIGHT_CUSTOM_FADING_BOOL)
43void backlight_set_fade_in(bool value); 41void backlight_set_fade_in(bool value);
44void backlight_set_fade_out(bool value); 42void backlight_set_fade_out(bool value);
45#endif 43#endif
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h
index d68d21455f..cd9f5867dc 100644
--- a/firmware/export/config-c200.h
+++ b/firmware/export/config-c200.h
@@ -111,6 +111,14 @@
111#define HAVE_BACKLIGHT 111#define HAVE_BACKLIGHT
112#define HAVE_BACKLIGHT_BRIGHTNESS 112#define HAVE_BACKLIGHT_BRIGHTNESS
113 113
114/* Main LCD backlight brightness range and defaults */
115#define MIN_BRIGHTNESS_SETTING 1
116#define MAX_BRIGHTNESS_SETTING 12
117#define DEFAULT_BRIGHTNESS_SETTING 6
118
119/* Which backlight fading type? */
120#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
121
114/* define this if you have a flash memory storage */ 122/* define this if you have a flash memory storage */
115#define HAVE_FLASH_STORAGE 123#define HAVE_FLASH_STORAGE
116 124
@@ -138,12 +146,6 @@
138/** Non-simulator section **/ 146/** Non-simulator section **/
139#ifndef SIMULATOR 147#ifndef SIMULATOR
140 148
141/* define this if the backlight thread is used for fade, not for sim, needs
142 * HAVE_BACKLIGHT_BRIGHTNESS */
143#ifndef BOOTLOADER
144#define USE_BACKLIGHT_SW_FADING
145#endif
146
147/* Define this if you have a PortalPlayer PP5024 */ 149/* Define this if you have a PortalPlayer PP5024 */
148#define CONFIG_CPU PP5022 150#define CONFIG_CPU PP5022
149 151
@@ -200,13 +202,6 @@
200 202
201#endif /* SIMULATOR */ 203#endif /* SIMULATOR */
202 204
203/** Port-specific settings **/
204
205/* Main LCD backlight brightness range and defaults */
206#define MIN_BRIGHTNESS_SETTING 1
207#define MAX_BRIGHTNESS_SETTING 12
208#define DEFAULT_BRIGHTNESS_SETTING 6
209
210/* Default recording levels */ 205/* Default recording levels */
211#define DEFAULT_REC_MIC_GAIN 23 206#define DEFAULT_REC_MIC_GAIN 23
212#define DEFAULT_REC_LEFT_GAIN 23 207#define DEFAULT_REC_LEFT_GAIN 23
diff --git a/firmware/export/config-c200v2.h b/firmware/export/config-c200v2.h
index 6ecb478c09..f6a386637c 100644
--- a/firmware/export/config-c200v2.h
+++ b/firmware/export/config-c200v2.h
@@ -136,12 +136,6 @@
136/** Non-simulator section **/ 136/** Non-simulator section **/
137#ifndef SIMULATOR 137#ifndef SIMULATOR
138 138
139/* define this if the backlight thread is used for fade, not for sim, needs
140 * HAVE_BACKLIGHT_BRIGHTNESS */
141#ifndef BOOTLOADER
142#define USE_BACKLIGHT_SW_FADING
143#endif
144
145/* Define this if you have a PortalPlayer PP5024 */ 139/* Define this if you have a PortalPlayer PP5024 */
146#define CONFIG_CPU AS3525 140#define CONFIG_CPU AS3525
147 141
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h
index edeb834ef7..2b3b09cb09 100644
--- a/firmware/export/config-cowond2.h
+++ b/firmware/export/config-cowond2.h
@@ -108,9 +108,10 @@
108 108
109/* Define this for LCD backlight available */ 109/* Define this for LCD backlight available */
110#define HAVE_BACKLIGHT 110#define HAVE_BACKLIGHT
111
112/* Enable LCD brightness control */ 111/* Enable LCD brightness control */
113#define HAVE_BACKLIGHT_BRIGHTNESS 112#define HAVE_BACKLIGHT_BRIGHTNESS
113/* Which backlight fading type? */
114#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
114 115
115/* Main LCD backlight brightness range and defaults */ 116/* Main LCD backlight brightness range and defaults */
116#define MIN_BRIGHTNESS_SETTING 1 117#define MIN_BRIGHTNESS_SETTING 1
@@ -129,13 +130,6 @@
129#define CONFIG_CHARGING CHARGING_SIMPLE 130#define CONFIG_CHARGING CHARGING_SIMPLE
130 131
131#ifndef SIMULATOR 132#ifndef SIMULATOR
132
133/* define this if the backlight thread is used for fade, not for sim, needs
134 * HAVE_BACKLIGHT_BRIGHTNESS */
135#ifndef BOOTLOADER
136#define USE_BACKLIGHT_SW_FADING
137#endif
138
139/* Define this if you have a TCC7801 */ 133/* Define this if you have a TCC7801 */
140#define CONFIG_CPU TCC7801 134#define CONFIG_CPU TCC7801
141 135
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index 2be64d95cc..7fba79679c 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -101,6 +101,9 @@
101#define HAVE_BACKLIGHT 101#define HAVE_BACKLIGHT
102#define HAVE_BACKLIGHT_BRIGHTNESS 102#define HAVE_BACKLIGHT_BRIGHTNESS
103 103
104/* Which backlight fading type? */
105#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
106
104/* define this if the unit uses a scrollwheel for navigation */ 107/* define this if the unit uses a scrollwheel for navigation */
105#define HAVE_SCROLLWHEEL 108#define HAVE_SCROLLWHEEL
106/* define from which rotation speed [degree/sec] on the acceleration starts */ 109/* define from which rotation speed [degree/sec] on the acceleration starts */
@@ -135,12 +138,6 @@
135/** Non-simulator section **/ 138/** Non-simulator section **/
136#ifndef SIMULATOR 139#ifndef SIMULATOR
137 140
138/* define this if the backlight thread is used for fade, not for sim, needs
139 * HAVE_BACKLIGHT_BRIGHTNESS */
140#ifndef BOOTLOADER
141#define USE_BACKLIGHT_SW_FADING
142#endif
143
144/* Define this if you have a PortalPlayer PP5024 */ 141/* Define this if you have a PortalPlayer PP5024 */
145#define CONFIG_CPU PP5024 142#define CONFIG_CPU PP5024
146 143
diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h
index 564916aea0..78246221be 100644
--- a/firmware/export/config-e200v2.h
+++ b/firmware/export/config-e200v2.h
@@ -106,6 +106,14 @@
106#define HAVE_BACKLIGHT 106#define HAVE_BACKLIGHT
107#define HAVE_BACKLIGHT_BRIGHTNESS 107#define HAVE_BACKLIGHT_BRIGHTNESS
108 108
109/* Main LCD backlight brightness range and defaults */
110#define MIN_BRIGHTNESS_SETTING 1
111#define MAX_BRIGHTNESS_SETTING 12
112#define DEFAULT_BRIGHTNESS_SETTING 6
113
114/* Which backlight fading type? */
115#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
116
109/* define this if the unit uses a scrollwheel for navigation */ 117/* define this if the unit uses a scrollwheel for navigation */
110#define HAVE_SCROLLWHEEL 118#define HAVE_SCROLLWHEEL
111/* define from which rotation speed [degree/sec] on the acceleration starts */ 119/* define from which rotation speed [degree/sec] on the acceleration starts */
@@ -134,12 +142,6 @@
134/** Non-simulator section **/ 142/** Non-simulator section **/
135#ifndef SIMULATOR 143#ifndef SIMULATOR
136 144
137/* define this if the backlight thread is used for fade, not for sim, needs
138 * HAVE_BACKLIGHT_BRIGHTNESS */
139#ifndef BOOTLOADER
140#define USE_BACKLIGHT_SW_FADING
141#endif
142
143/* Define this if you have an AMS AS3525*/ 145/* Define this if you have an AMS AS3525*/
144#define CONFIG_CPU AS3525 146#define CONFIG_CPU AS3525
145 147
@@ -195,13 +197,6 @@
195 197
196#endif /* SIMULATOR */ 198#endif /* SIMULATOR */
197 199
198/** Port-specific settings **/
199
200/* Main LCD backlight brightness range and defaults */
201#define MIN_BRIGHTNESS_SETTING 1
202#define MAX_BRIGHTNESS_SETTING 12
203#define DEFAULT_BRIGHTNESS_SETTING 6
204
205/* Default recording levels */ 200/* Default recording levels */
206#define DEFAULT_REC_MIC_GAIN 23 201#define DEFAULT_REC_MIC_GAIN 23
207#define DEFAULT_REC_LEFT_GAIN 23 202#define DEFAULT_REC_LEFT_GAIN 23
diff --git a/firmware/export/config-fuze.h b/firmware/export/config-fuze.h
index 3e5880775b..0bc2d70bf7 100644
--- a/firmware/export/config-fuze.h
+++ b/firmware/export/config-fuze.h
@@ -106,6 +106,14 @@
106#define HAVE_BACKLIGHT 106#define HAVE_BACKLIGHT
107#define HAVE_BACKLIGHT_BRIGHTNESS 107#define HAVE_BACKLIGHT_BRIGHTNESS
108 108
109/* Main LCD backlight brightness range and defaults */
110#define MIN_BRIGHTNESS_SETTING 1
111#define MAX_BRIGHTNESS_SETTING 12
112#define DEFAULT_BRIGHTNESS_SETTING 6
113
114/* Which backlight fading type? */
115#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
116
109/* define this if the unit uses a scrollwheel for navigation */ 117/* define this if the unit uses a scrollwheel for navigation */
110#define HAVE_SCROLLWHEEL 118#define HAVE_SCROLLWHEEL
111/* define from which rotation speed [degree/sec] on the acceleration starts */ 119/* define from which rotation speed [degree/sec] on the acceleration starts */
@@ -134,12 +142,6 @@
134/** Non-simulator section **/ 142/** Non-simulator section **/
135#ifndef SIMULATOR 143#ifndef SIMULATOR
136 144
137/* define this if the backlight thread is used for fade, not for sim, needs
138 * HAVE_BACKLIGHT_BRIGHTNESS */
139#ifndef BOOTLOADER
140#define USE_BACKLIGHT_SW_FADING
141#endif
142
143/* Define this if you have an AMS AS3525*/ 145/* Define this if you have an AMS AS3525*/
144#define CONFIG_CPU AS3525 146#define CONFIG_CPU AS3525
145 147
@@ -195,13 +197,6 @@
195 197
196#endif /* SIMULATOR */ 198#endif /* SIMULATOR */
197 199
198/** Port-specific settings **/
199
200/* Main LCD backlight brightness range and defaults */
201#define MIN_BRIGHTNESS_SETTING 1
202#define MAX_BRIGHTNESS_SETTING 12
203#define DEFAULT_BRIGHTNESS_SETTING 6
204
205/* Default recording levels */ 200/* Default recording levels */
206#define DEFAULT_REC_MIC_GAIN 23 201#define DEFAULT_REC_MIC_GAIN 23
207#define DEFAULT_REC_LEFT_GAIN 23 202#define DEFAULT_REC_LEFT_GAIN 23
diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h
index 93068ae441..6b993b6082 100644
--- a/firmware/export/config-gigabeat-s.h
+++ b/firmware/export/config-gigabeat-s.h
@@ -117,15 +117,14 @@
117#define MAX_BRIGHTNESS_SETTING 24 117#define MAX_BRIGHTNESS_SETTING 24
118#define DEFAULT_BRIGHTNESS_SETTING 12 118#define DEFAULT_BRIGHTNESS_SETTING 12
119 119
120/* Implementation-defined fading type with bool settings */
121#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_TARGET
120 122
121#define HAVE_HEADPHONE_DETECTION 123#define HAVE_HEADPHONE_DETECTION
122#endif /* BOOTLOADER */ 124#endif /* BOOTLOADER */
123 125
124#ifndef SIMULATOR 126#ifndef SIMULATOR
125 127
126/* Implementation-defined fading type with bool settings */
127#define USE_BACKLIGHT_CUSTOM_FADING_BOOL
128
129/* The LCD on a Gigabeat is 240x320 - it is portrait */ 128/* The LCD on a Gigabeat is 240x320 - it is portrait */
130#define HAVE_PORTRAIT_LCD 129#define HAVE_PORTRAIT_LCD
131 130
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index be718259f8..6ca2a0701e 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -74,7 +74,7 @@
74#define HAVE_BACKLIGHT 74#define HAVE_BACKLIGHT
75 75
76/* We can fade the backlight by using PWM */ 76/* We can fade the backlight by using PWM */
77#define HAVE_BACKLIGHT_PWM_FADING 77#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_PWM
78 78
79/* Define this if you have a software controlled poweroff */ 79/* Define this if you have a software controlled poweroff */
80#define HAVE_SW_POWEROFF 80#define HAVE_SW_POWEROFF
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index 4757d7708c..74074e83e0 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -69,7 +69,7 @@
69#define HAVE_BACKLIGHT 69#define HAVE_BACKLIGHT
70 70
71/* We can fade the backlight by using PWM */ 71/* We can fade the backlight by using PWM */
72#define HAVE_BACKLIGHT_PWM_FADING 72#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_PWM
73 73
74/* Define this if you have a software controlled poweroff */ 74/* Define this if you have a software controlled poweroff */
75#define HAVE_SW_POWEROFF 75#define HAVE_SW_POWEROFF
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index 05d75fc4f0..037bb26b2d 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -68,6 +68,8 @@
68/* Define this for LCD backlight available */ 68/* Define this for LCD backlight available */
69#define HAVE_BACKLIGHT 69#define HAVE_BACKLIGHT
70#define HAVE_BACKLIGHT_BRIGHTNESS 70#define HAVE_BACKLIGHT_BRIGHTNESS
71/* Which backlight fading type? */
72#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
71 73
72/* Define this if you have a software controlled poweroff */ 74/* Define this if you have a software controlled poweroff */
73#define HAVE_SW_POWEROFF 75#define HAVE_SW_POWEROFF
@@ -125,12 +127,6 @@
125 127
126#ifndef SIMULATOR 128#ifndef SIMULATOR
127 129
128/* define this if the backlight thread is used for fade, not for sim, needs
129 * HAVE_BACKLIGHT_BRIGHTNESS */
130#ifndef BOOTLOADER
131#define USE_BACKLIGHT_SW_FADING
132#endif
133
134/* Define this if your LCD can be enabled/disabled */ 130/* Define this if your LCD can be enabled/disabled */
135#define HAVE_LCD_ENABLE 131#define HAVE_LCD_ENABLE
136 132
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index 8b1f9086bb..27bd2c523b 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -90,6 +90,8 @@
90/* Define this for LCD backlight available */ 90/* Define this for LCD backlight available */
91#define HAVE_BACKLIGHT 91#define HAVE_BACKLIGHT
92#define HAVE_BACKLIGHT_BRIGHTNESS 92#define HAVE_BACKLIGHT_BRIGHTNESS
93/* Which backlight fading type? */
94#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
93 95
94/* define this if you have a disk storage, i.e. something 96/* define this if you have a disk storage, i.e. something
95 that needs spinups and can cause skips when shaked */ 97 that needs spinups and can cause skips when shaked */
@@ -127,12 +129,6 @@
127 129
128#ifndef SIMULATOR 130#ifndef SIMULATOR
129 131
130/* define this if the backlight thread is used for fade, not for sim, needs
131 * HAVE_BACKLIGHT_BRIGHTNESS */
132#ifndef BOOTLOADER
133#define USE_BACKLIGHT_SW_FADING
134#endif
135
136/* Define this if your LCD can set contrast */ 132/* Define this if your LCD can set contrast */
137#define HAVE_LCD_CONTRAST 133#define HAVE_LCD_CONTRAST
138 134
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 210eb1d717..bc59ededfe 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -101,7 +101,7 @@
101#define HAVE_BACKLIGHT 101#define HAVE_BACKLIGHT
102 102
103/* We can fade the backlight by using PWM */ 103/* We can fade the backlight by using PWM */
104#define HAVE_BACKLIGHT_PWM_FADING 104#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_PWM
105 105
106/* Define this if you can detect headphones */ 106/* Define this if you can detect headphones */
107#define HAVE_HEADPHONE_DETECTION 107#define HAVE_HEADPHONE_DETECTION
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
index 49630d7b3d..4775350712 100644
--- a/firmware/export/config-ipodmini2g.h
+++ b/firmware/export/config-ipodmini2g.h
@@ -101,7 +101,7 @@
101#define HAVE_BACKLIGHT 101#define HAVE_BACKLIGHT
102 102
103/* We can fade the backlight by using PWM */ 103/* We can fade the backlight by using PWM */
104#define HAVE_BACKLIGHT_PWM_FADING 104#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_PWM
105 105
106/* define this if the unit uses a scrollwheel for navigation */ 106/* define this if the unit uses a scrollwheel for navigation */
107#define HAVE_SCROLLWHEEL 107#define HAVE_SCROLLWHEEL
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index 8752181bb9..1d82ec4428 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -81,15 +81,14 @@
81/* Define this for LCD backlight available */ 81/* Define this for LCD backlight available */
82#define HAVE_BACKLIGHT 82#define HAVE_BACKLIGHT
83#define HAVE_BACKLIGHT_BRIGHTNESS 83#define HAVE_BACKLIGHT_BRIGHTNESS
84/* We can fade the backlight by using PWM */
85#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_PWM
84 86
85/* Main LCD backlight brightness range and defaults */ 87/* Main LCD backlight brightness range and defaults */
86#define MIN_BRIGHTNESS_SETTING 1 88#define MIN_BRIGHTNESS_SETTING 1
87#define MAX_BRIGHTNESS_SETTING 32 89#define MAX_BRIGHTNESS_SETTING 32
88#define DEFAULT_BRIGHTNESS_SETTING 16 90#define DEFAULT_BRIGHTNESS_SETTING 16
89 91
90/* We can fade the backlight by using PWM */
91#define HAVE_BACKLIGHT_PWM_FADING
92
93/* define this if the unit uses a scrollwheel for navigation */ 92/* define this if the unit uses a scrollwheel for navigation */
94#define HAVE_SCROLLWHEEL 93#define HAVE_SCROLLWHEEL
95/* define from which rotation speed [degree/sec] on the acceleration starts */ 94/* define from which rotation speed [degree/sec] on the acceleration starts */
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index ab974dc236..b658a9b3f8 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -86,13 +86,14 @@
86#define HAVE_BACKLIGHT 86#define HAVE_BACKLIGHT
87#define HAVE_BACKLIGHT_BRIGHTNESS 87#define HAVE_BACKLIGHT_BRIGHTNESS
88 88
89/* We can fade the backlight by using PWM */
90#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_PWM
91
89/* Main LCD backlight brightness range and defaults */ 92/* Main LCD backlight brightness range and defaults */
90#define MIN_BRIGHTNESS_SETTING 1 93#define MIN_BRIGHTNESS_SETTING 1
91#define MAX_BRIGHTNESS_SETTING 32 94#define MAX_BRIGHTNESS_SETTING 32
92#define DEFAULT_BRIGHTNESS_SETTING 16 95#define DEFAULT_BRIGHTNESS_SETTING 16
93 96
94/* We can fade the backlight by using PWM */
95#define HAVE_BACKLIGHT_PWM_FADING
96 97
97/* define this if the unit uses a scrollwheel for navigation */ 98/* define this if the unit uses a scrollwheel for navigation */
98#define HAVE_SCROLLWHEEL 99#define HAVE_SCROLLWHEEL
diff --git a/firmware/export/config-mrobe100.h b/firmware/export/config-mrobe100.h
index 4ade179c04..f2fc5cb37a 100644
--- a/firmware/export/config-mrobe100.h
+++ b/firmware/export/config-mrobe100.h
@@ -70,7 +70,7 @@
70#define HAVE_BACKLIGHT 70#define HAVE_BACKLIGHT
71 71
72/* We can fade the backlight by using PWM */ 72/* We can fade the backlight by using PWM */
73#define HAVE_BACKLIGHT_PWM_FADING 73#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_PWM
74 74
75/* Main LCD backlight brightness range and defaults */ 75/* Main LCD backlight brightness range and defaults */
76#define MIN_BRIGHTNESS_SETTING 1 76#define MIN_BRIGHTNESS_SETTING 1
diff --git a/firmware/export/config-sa9200.h b/firmware/export/config-sa9200.h
index b9fd4575bc..624befcf12 100755
--- a/firmware/export/config-sa9200.h
+++ b/firmware/export/config-sa9200.h
@@ -90,6 +90,9 @@
90#define MAX_BRIGHTNESS_SETTING 12 90#define MAX_BRIGHTNESS_SETTING 12
91#define DEFAULT_BRIGHTNESS_SETTING 6 91#define DEFAULT_BRIGHTNESS_SETTING 6
92 92
93/* Which backlight fading type? */
94#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
95
93/* define this if you have a flash memory storage */ 96/* define this if you have a flash memory storage */
94#define HAVE_FLASH_STORAGE 97#define HAVE_FLASH_STORAGE
95 98
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 7fb41d8d83..58ae66d1cd 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -113,6 +113,24 @@
113#define H300_REMOTE 2 113#define H300_REMOTE 2
114#define X5_REMOTE 3 114#define X5_REMOTE 3
115 115
116/* CONFIG_BACKLIGHT_FADING */
117/* No fading capabilities at all (yet) */
118#define BACKLIGHT_NO_FADING 0x0
119/* Backlight fading is controlled using a hardware PWM mechanism */
120#define BACKLIGHT_FADING_PWM 0x1
121/* Backlight is controlled using a software implementation
122 * BACKLIGHT_FADING_SW_SETTING means that backlight is turned on by only setting
123 * the brightness (i.e. no real difference between backlight_on and
124 * backlight_set_brightness)
125 * BACKLIGHT_FADING_SW_SETTING means that backlight brightness is restored
126 * "in hardware", from a hardware register upon backlight_on
127 * Both types need to have minor adjustments in the software fading code */
128#define BACKLIGHT_FADING_SW_SETTING 0x2
129#define BACKLIGHT_FADING_SW_HW_REG 0x4
130/* Backlight fading is done in a target specific way
131 * for example in hardware, but not controllable*/
132#define BACKLIGHT_FADING_TARGET 0x8
133
116/* CONFIG_CHARGING */ 134/* CONFIG_CHARGING */
117 135
118/* Generic types */ 136/* Generic types */
@@ -348,7 +366,12 @@
348#include "config_caps.h" 366#include "config_caps.h"
349 367
350/* now set any CONFIG_ defines correctly if they are not used, 368/* now set any CONFIG_ defines correctly if they are not used,
351 No need to do this on CONFIG_'s which are compulsary (e.g CONFIG_CODEC ) */ 369 No need to do this on CONFIG_'s which are compulsory (e.g CONFIG_CODEC ) */
370
371#if !defined(CONFIG_BACKLIGHT_FADING)
372#define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
373#endif
374
352#ifndef CONFIG_TUNER 375#ifndef CONFIG_TUNER
353#define CONFIG_TUNER 0 376#define CONFIG_TUNER 0
354#endif 377#endif
@@ -413,6 +436,32 @@
413#define CONFIG_STORAGE_MULTI 436#define CONFIG_STORAGE_MULTI
414#endif 437#endif
415 438
439/* deactive fading in bootloader/sim */
440#if defined(BOOTLOADER) || defined(SIMULATOR)
441#undef CONFIG_BACKLIGHT_FADING
442#define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
443#endif
444
445/* determine which setting/manual text to use,
446 * possibly overridden in target config */
447#if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
448
449#ifndef HAVE_BACKLIGHT_FADING_INT_SETTING
450#define HAVE_BACKLIGHT_FADING_INT_SETTING
451#endif
452
453#elif (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \
454 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) \
455 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_TARGET)
456
457/* BACKLIGHT_FADING_TARGET may the setting to use */
458#if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
459 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
460#define HAVE_BACKLIGHT_FADING_BOOL_SETTING
461#endif
462
463#endif /* CONFIG_BACKLIGHT_FADING */
464
416#if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ) 465#if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
417/* Bootloaders don't use CPU frequency adjustment */ 466/* Bootloaders don't use CPU frequency adjustment */
418#undef HAVE_ADJUSTABLE_CPU_FREQ 467#undef HAVE_ADJUSTABLE_CPU_FREQ