From 634dcc7387b14d0cbb3de311e5691909a1292946 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 25 May 2020 00:39:29 -0400 Subject: [PATCH] lcd_hd44780: Only calibrate cmd_wait_ticks on mcus with strict timing The calibration isn't valid on the linux mcu, so make it dependent on CONFIG_HAVE_STRICT_TIMING. Signed-off-by: Kevin O'Connor --- src/lcd_hd44780.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lcd_hd44780.c b/src/lcd_hd44780.c index 26fa63cb..9137cc71 100644 --- a/src/lcd_hd44780.c +++ b/src/lcd_hd44780.c @@ -100,6 +100,11 @@ command_config_hd44780(uint32_t *args) h->d6 = gpio_out_setup(args[5], 0); h->d7 = gpio_out_setup(args[6], 0); + if (!CONFIG_HAVE_STRICT_TIMING) { + h->cmd_wait_ticks = args[7]; + return; + } + // Calibrate cmd_wait_ticks irq_disable(); uint32_t start = timer_read_time();