diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/backlight.c | 2 | ||||
-rw-r--r-- | firmware/export/backlight.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index d118830721..740acd1d82 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -548,6 +548,8 @@ void backlight_set_brightness(int val) | |||
548 | /* set H300 brightness by changing the PWM | 548 | /* set H300 brightness by changing the PWM |
549 | accepts 0..15 but note that 0 and 1 give a black display! */ | 549 | accepts 0..15 but note that 0 and 1 give a black display! */ |
550 | unsigned char ucVal = (unsigned char)(val & 0x0F); | 550 | unsigned char ucVal = (unsigned char)(val & 0x0F); |
551 | if(val<MIN_BRIGHTNESS_SETTING) | ||
552 | val=MIN_BRIGHTNESS_SETTING; | ||
551 | pcf50606_set_bl_pwm(ucVal); | 553 | pcf50606_set_bl_pwm(ucVal); |
552 | } | 554 | } |
553 | #endif | 555 | #endif |
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h index f4c62a2028..05d395f4a6 100644 --- a/firmware/export/backlight.h +++ b/firmware/export/backlight.h | |||
@@ -51,5 +51,7 @@ void sim_remote_backlight(int value); | |||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | 53 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS |
54 | #define MIN_BRIGHTNESS_SETTING 2 | ||
55 | #define MAX_BRIGHTNESS_SETTING 15 | ||
54 | void backlight_set_brightness(int val); | 56 | void backlight_set_brightness(int val); |
55 | #endif | 57 | #endif |