diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index 9e93638717..2450559b8d 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c @@ -18,10 +18,10 @@ * KIND, either express or implied. * ****************************************************************************/ +#include "config.h" #if defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC) #include /* sim uses rand for peakmeter simulation */ #endif -#include "config.h" #include "mas.h" #include "thread.h" #include "kernel.h" diff --git a/firmware/backlight.c b/firmware/backlight.c index 5406f1eeec..f9575dfdb7 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -37,8 +37,6 @@ #include "lcd.h" #include "screendump.h" -#ifdef HAVE_BACKLIGHT - #ifdef HAVE_REMOTE_LCD #include "lcd-remote.h" #endif @@ -49,7 +47,7 @@ #include "backlight-sim.h" #endif -#if defined(BACKLIGHT_FULL_INIT) +#if defined(HAVE_BACKLIGHT) && defined(BACKLIGHT_FULL_INIT) #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \ || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) @@ -962,13 +960,16 @@ void buttonlight_set_brightness(int val) } #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */ -#else /* !defined(BACKLIGHT_FULL_INIT) +#else /* !defined(HAVE_BACKLIGHT) || !defined(BACKLIGHT_FULL_INIT) -- no backlight, empty dummy functions */ + +#if defined(HAVE_BACKLIGHT) && !defined(BACKLIGHT_FULL_INIT) void backlight_init(void) { (void)_backlight_init(); _backlight_on(); } +#endif void backlight_on(void) {} void backlight_off(void) {} @@ -997,6 +998,4 @@ void backlight_set_brightness(int val) { (void)val; } #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS void buttonlight_set_brightness(int val) { (void)val; } #endif -#endif /* defined(BACKLIGHT_FULL_INIT) */ - -#endif /* HAVE_BACKLIGHT */ +#endif /* defined(HAVE_BACKLIGHT) && defined(BACKLIGHT_FULL_INIT) */