diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-05-25 00:38:32 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-05-31 14:57:06 -0400 |
commit | 0cbb8fdc9a50f9228580f54c46b1a96c1c0d8cc5 (patch) | |
tree | 021b005399e3ea1fed7e74bec0fbfcaf4479f57e | |
parent | 98192d710f6379b28c8320bdc33ceaf6a524c2fd (diff) | |
download | kutter-0cbb8fdc9a50f9228580f54c46b1a96c1c0d8cc5.tar.gz kutter-0cbb8fdc9a50f9228580f54c46b1a96c1c0d8cc5.tar.xz kutter-0cbb8fdc9a50f9228580f54c46b1a96c1c0d8cc5.zip |
lcd_st7920: Only calibrate 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>
-rw-r--r-- | src/lcd_st7920.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lcd_st7920.c b/src/lcd_st7920.c index 0f6a444d..e4728e74 100644 --- a/src/lcd_st7920.c +++ b/src/lcd_st7920.c @@ -106,6 +106,12 @@ command_config_st7920(uint32_t *args) s->sid = gpio_out_setup(args[3], 0); gpio_out_setup(args[1], 1); + if (!CONFIG_HAVE_STRICT_TIMING) { + s->sync_wait_ticks = args[4]; + s->cmd_wait_ticks = args[5]; + return; + } + // Calibrate cmd_wait_ticks st7920_xmit_byte(s, SYNC_CMD); st7920_xmit_byte(s, 0x20); |