From 2c658775074f4ccef5a520e8a5dc4773370b157f Mon Sep 17 00:00:00 2001 From: Liu Zhongwei Date: Thu, 17 Oct 2024 15:52:35 +0800 Subject: [PATCH] feat: update --- src/chip/CH422G.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chip/CH422G.cpp b/src/chip/CH422G.cpp index 246d098..799d27e 100644 --- a/src/chip/CH422G.cpp +++ b/src/chip/CH422G.cpp @@ -124,6 +124,8 @@ void ESP_IOExpander_CH422G::enableAllIO_Input(void) i2c_master_write_to_device(ch422g->i2c_num, CH422G_REG_WR_SET, &data, sizeof(data), pdMS_TO_TICKS(I2C_TIMEOUT_MS)) ); ch422g->regs.wr_set = data; + // Delay 1ms to wait for the IO expander to switch to input mode + vTaskDelay(pdMS_TO_TICKS(2)); } void ESP_IOExpander_CH422G::enableAllIO_Output(void)