From 5a60b8d573cfb2c40014d23614809d825198dc15 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 18 Sep 2023 12:58:54 -0500 Subject: [PATCH] Only delay when explicitly called for --- shared-module/dotclockframebuffer/__init__.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shared-module/dotclockframebuffer/__init__.c b/shared-module/dotclockframebuffer/__init__.c index 674c824af5..9bea7c2897 100644 --- a/shared-module/dotclockframebuffer/__init__.c +++ b/shared-module/dotclockframebuffer/__init__.c @@ -66,15 +66,14 @@ void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexp // deassert CS pin_change(bus, /* set */ bus->cs_mask, 0); - uint16_t delay_length_ms = 10; if (delay) { data_size++; - delay_length_ms = *(cmd + 1 + data_size); + uint16_t delay_length_ms = *(cmd + 1 + data_size); if (delay_length_ms == 255) { delay_length_ms = 500; } + mp_hal_delay_ms(delay_length_ms); } - mp_hal_delay_ms(delay_length_ms); i += 2 + data_size; } common_hal_busio_i2c_unlock(bus->bus);