From 5aba0a7a48e0f83761fafcac5d1a366f1f21e5fa Mon Sep 17 00:00:00 2001 From: Chris Fiege Date: Tue, 28 Nov 2023 09:22:05 +0100 Subject: [PATCH] i2c+usbsdmux: Some cleanups Signed-off-by: Chris Fiege --- usbsdmux/i2c_gpio.py | 4 ++-- usbsdmux/usbsdmux.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usbsdmux/i2c_gpio.py b/usbsdmux/i2c_gpio.py index 7156487..c1ccc4d 100644 --- a/usbsdmux/i2c_gpio.py +++ b/usbsdmux/i2c_gpio.py @@ -114,7 +114,7 @@ class Pca9536(I2cGpio): """ # The PCA9536 I2C slave Address in 7-Bit Format - _I2cAddr = 0x41 + _I2cAddr = 0b100_0001 gpio_0 = 0x01 gpio_1 = 0x02 @@ -129,7 +129,7 @@ class Tca6408(I2cGpio): """ # The TCA6408 I2C slave Address in 7-Bit Format - _I2cAddr = 0b0100_000 + _I2cAddr = 0b010_0000 gpio_0 = 0x01 gpio_1 = 0x02 diff --git a/usbsdmux/usbsdmux.py b/usbsdmux/usbsdmux.py index 923a23c..0eea25f 100644 --- a/usbsdmux/usbsdmux.py +++ b/usbsdmux/usbsdmux.py @@ -159,6 +159,7 @@ def get_mode(self): if val & self._select_DUT: return "dut" + return "host" def mode_disconnect(self, wait=True): @@ -244,6 +245,7 @@ def get_mode(self): if val & self._select_DUT: return "dut" + return "host" def mode_disconnect(self, wait=True):