Skip to content

Commit

Permalink
feat: reduce minimum wait time (see espressif#4999)
Browse files Browse the repository at this point in the history
  • Loading branch information
hennejg authored and holdersn committed Mar 26, 2024
1 parent 77dd1d3 commit 69d4020
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/driver/i2c/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static const char *I2C_TAG = "i2c";
#define I2C_FIFO_FULL_THRESH_VAL (28)
#define I2C_FIFO_EMPTY_THRESH_VAL (5)
#define I2C_IO_INIT_LEVEL (1)
#define I2C_CMD_ALIVE_INTERVAL_TICK (1000 / portTICK_PERIOD_MS)
#define I2C_CMD_ALIVE_INTERVAL_TICK (20 / portTICK_PERIOD_MS)
#define I2C_CMD_EVT_ALIVE (0)
#define I2C_CMD_EVT_DONE (1)
#define I2C_EVT_QUEUE_LEN (1)
Expand Down Expand Up @@ -1502,8 +1502,10 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle,
i2c_hw_fsm_reset(i2c_num);
clear_bus_cnt[i2c_num] = 0;
}

i2c_reset_tx_fifo(i2c_num);
i2c_reset_rx_fifo(i2c_num);

const i2c_cmd_desc_t *cmd = (const i2c_cmd_desc_t *) cmd_handle;
/* Before starting the transfer, resetset the number of bytes sent to 0.
* `i2c_master_cmd_begin_static` will also reset this field for each node
Expand Down

0 comments on commit 69d4020

Please sign in to comment.