From d3cf366868500403bbe072bddf44eaf8c7f749d4 Mon Sep 17 00:00:00 2001 From: Avi Eisenberg <613ike@gmail.com> Date: Tue, 19 Aug 2014 13:47:22 -0400 Subject: Fuze+: fixed brightness settings: previously there were 81 settings for only 26 possible brightnesses, now there are 33 for 33 Change-Id: Idc6e3a635850f3ee54ec23246795af88af960ab0 Reviewed-on: http://gerrit.rockbox.org/916 Reviewed-by: Amaury Pouly --- firmware/export/config/sansafuzeplus.h | 4 ++-- firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h index 369e798528..c6f30ab00e 100644 --- a/firmware/export/config/sansafuzeplus.h +++ b/firmware/export/config/sansafuzeplus.h @@ -114,8 +114,8 @@ /* Main LCD backlight brightness range and defaults */ #define MIN_BRIGHTNESS_SETTING 0 -#define MAX_BRIGHTNESS_SETTING 80 -#define DEFAULT_BRIGHTNESS_SETTING 40 +#define MAX_BRIGHTNESS_SETTING 32 +#define DEFAULT_BRIGHTNESS_SETTING 16 /* Which backlight fading type? */ #define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c index efe9268989..3ee9d0914a 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c @@ -29,7 +29,7 @@ void _backlight_set_brightness(int brightness) { if(brightness != 0) - brightness = 32 - (brightness * 32) / 100; + brightness = MAX_BRIGHTNESS_SETTING + 1 - brightness; imx233_pinctrl_set_gpio(1, 28, false); udelay(600); while(brightness-- > 0) -- cgit v1.2.3