drivers/display: mb_display: Use 4 ms refresh timer

The code was so far requesting 5 ms refresh timer, however with a
default TICKS_PER_SECOND=100 this was always rounded up to 10 ms,
causing some flickering. The closest TICKS_PER_SECOND that will give
flicker-less display but also give optimal ms-to-ticks calculations is
250, so change the timer to match that. After this change any code
using the display is recommended to set 250 as ticks per second.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-05-30 10:57:26 +03:00 committed by Johan Hedberg
commit 7574bebbfe

View file

@ -118,7 +118,7 @@ static void start_image(struct mb_display *disp, const struct mb_image *img)
disp->expiry = k_uptime_get() + disp->duration; disp->expiry = k_uptime_get() + disp->duration;
} }
k_timer_start(&disp->timer, K_NO_WAIT, K_MSEC(5)); k_timer_start(&disp->timer, K_NO_WAIT, K_MSEC(4));
} }
#define ROW_PIN(n) (LED_ROW1_GPIO_PIN + (n)) #define ROW_PIN(n) (LED_ROW1_GPIO_PIN + (n))