diff --git a/tests/psoc6/dut/i2c_hard.py b/tests/psoc6/dut/i2c_hard.py index 1f45cee576e43..5e91fcf7c7bd8 100644 --- a/tests/psoc6/dut/i2c_hard.py +++ b/tests/psoc6/dut/i2c_hard.py @@ -13,16 +13,16 @@ scl_pin = "P6_4" sda_pin = "P6_5" -i2c = I2C(0,scl=scl_pin,sda=sda_pin,freq=400000) +i2c = I2C(0, scl=scl_pin, sda=sda_pin, freq=400000) addr = i2c.scan() -master_data = b'\x01\x00\x17' +master_data = b"\x01\x00\x17" counter = 0 -while(counter!=5): +while counter != 5: i2c.writeto(addr[0], master_data) time.sleep(1) slave_data = i2c.readfrom(addr[0], 3) print("Slave sent data: ", slave_data) master_data = slave_data time.sleep(1) - counter = counter+1 + counter = counter + 1 diff --git a/tests/psoc6/dut/i2c_soft.py b/tests/psoc6/dut/i2c_soft.py index 667b8c6b7088d..e437a3f1e15f7 100644 --- a/tests/psoc6/dut/i2c_soft.py +++ b/tests/psoc6/dut/i2c_soft.py @@ -14,15 +14,14 @@ i2c = SoftI2C(scl=scl_pin, sda=sda_pin, freq=400000) addr = i2c.scan() -master_data = b'\x01\x00\x17' +master_data = b"\x01\x00\x17" counter = 0 -while(counter!=5): +while counter != 5: i2c.writeto(addr[0], master_data) time.sleep(1) slave_data = i2c.readfrom(addr[0], 3) print("Slave sent data: ", slave_data) master_data = slave_data time.sleep(1) - counter = counter+1 - + counter = counter + 1