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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-05-25 00:39:29 -04:00
parent 0cbb8fdc9a
commit 634dcc7387
1 changed files with 5 additions and 0 deletions

View File

@ -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();