summaryrefslogtreecommitdiff
path: root/firmware/export/config.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-01-26 23:21:49 +0000
committerThomas Martitz <kugel@rockbox.org>2009-01-26 23:21:49 +0000
commit12a0ed3b8dd5d8996abf827115f526e21e838872 (patch)
tree00ec62e04cf0e4bc4ea9c7bc0f5b8893e198c7cd /firmware/export/config.h
parent4e1b7bf7286c3994e34ca11f740a2165d9b5a001 (diff)
downloadrockbox-12a0ed3b8dd5d8996abf827115f526e21e838872.tar.gz
rockbox-12a0ed3b8dd5d8996abf827115f526e21e838872.zip
Commit FS#9724, which reworks the preprocessor defines related to backlight fading to a CONFIG_BACKLIGHT_FADING style. The apps/ code will only see which setting is supposed to be used, specific backlight fading handling is kept in firmware, slightly reword the manual text about software fading too with regards to the Gigabeat S
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19860 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r--firmware/export/config.h51
1 files changed, 50 insertions, 1 deletions
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