refactor(i2c): clean up the i2ctool example

removed unused console cli.
removed unnecessary dependencies.
behaviour changed: user must run the i2cconfig command before others
updated pytest as well
This commit is contained in:
morris
2025-08-29 15:38:00 +08:00
parent 1275129a62
commit 57034c3bcf
10 changed files with 126 additions and 260 deletions

View File

@@ -11,6 +11,8 @@ EXPECT_TIMEOUT = 20
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_i2ctools_example(dut: IdfDut) -> None:
dut.expect_exact('i2c-tools>', timeout=EXPECT_TIMEOUT)
# Configure the I2C bus
dut.write('i2cconfig --scl 19 --sda 18')
# Get i2c address
dut.write('i2cdetect')
dut.expect_exact('5b', timeout=EXPECT_TIMEOUT)