test(i2c): Enhance the stability for i2c tests

This commit is contained in:
C.S.M
2024-11-19 16:45:05 +08:00
parent 038a666710
commit a677e41392
2 changed files with 2 additions and 2 deletions

View File

@ -74,6 +74,7 @@ static void i2c_slave_read_test_v2(void)
.slave_addr = ESP_SLAVE_ADDR, .slave_addr = ESP_SLAVE_ADDR,
.send_buf_depth = DATA_LENGTH, .send_buf_depth = DATA_LENGTH,
.receive_buf_depth = DATA_LENGTH, .receive_buf_depth = DATA_LENGTH,
.flags.enable_internal_pullup = true,
}; };
TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle)); TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle));
@ -200,6 +201,7 @@ static void slave_write_buffer_test_v2(void)
.slave_addr = ESP_SLAVE_ADDR, .slave_addr = ESP_SLAVE_ADDR,
.send_buf_depth = DATA_LENGTH, .send_buf_depth = DATA_LENGTH,
.receive_buf_depth = DATA_LENGTH, .receive_buf_depth = DATA_LENGTH,
.flags.enable_internal_pullup = true,
}; };
TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle)); TEST_ESP_OK(i2c_new_slave_device(&i2c_slv_config, &handle));

View File

@ -774,8 +774,6 @@ static inline void i2c_ll_slave_init(i2c_dev_t *hw)
ctrl_reg.sda_force_out = 1; ctrl_reg.sda_force_out = 1;
ctrl_reg.scl_force_out = 1; ctrl_reg.scl_force_out = 1;
hw->ctr.val = ctrl_reg.val; hw->ctr.val = ctrl_reg.val;
hw->fifo_conf.fifo_addr_cfg_en = 0;
hw->scl_stretch_conf.slave_scl_stretch_en = 0;
} }
/** /**