From 90128756f9e57cd8fca8c7bb564d2e4ec2ec4e51 Mon Sep 17 00:00:00 2001 From: Andrew Dennison Date: Wed, 1 Feb 2023 10:53:09 +1100 Subject: [PATCH] test_i2c: test reading config --- test/test_i2c.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_i2c.py b/test/test_i2c.py index 5920afba9..a1865dd2a 100644 --- a/test/test_i2c.py +++ b/test/test_i2c.py @@ -90,6 +90,8 @@ class TestI2C(unittest.TestCase): def check(): yield from dut.bus.write(I2C_CONFIG_ADDR, 4) + data = (yield from dut.bus.read(I2C_CONFIG_ADDR)) & 0xff + self.assertEqual(data, 4) yield from dut.bus.write(I2C_XFER_ADDR, I2C_START) yield from check_trans(scl=True, sda=False)