diff options
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r-- | firmware/export/config.h | 51 |
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 |