From 25b6b527341f18c7b0de17794e0724cbb1a60f04 Mon Sep 17 00:00:00 2001 From: "C.S.M" Date: Mon, 17 Mar 2025 12:37:08 +0800 Subject: [PATCH] fix(i2c): Fix the array size of static operation, Closes https://github.com/espressif/esp-idf/issues/15583 --- components/driver/i2c/i2c_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/driver/i2c/i2c_private.h b/components/driver/i2c/i2c_private.h index 0d0e6cea20..aaa5a7a9aa 100644 --- a/components/driver/i2c/i2c_private.h +++ b/components/driver/i2c/i2c_private.h @@ -52,7 +52,7 @@ extern "C" { #define I2C_ALLOW_INTR_PRIORITY_MASK ESP_INTR_FLAG_LOWMED #define I2C_PM_LOCK_NAME_LEN_MAX 16 -#define I2C_STATIC_OPERATION_ARRAY_MAX 6 +#define I2C_STATIC_OPERATION_ARRAY_MAX SOC_I2C_CMD_REG_NUM #define I2C_TRANS_READ_COMMAND(ack_value) {.ack_val = (ack_value), .op_code = I2C_LL_CMD_READ} #define I2C_TRANS_WRITE_COMMAND(ack_check) {.ack_en = (ack_check), .op_code = I2C_LL_CMD_WRITE}