Skip to content

Commit 1c5176b

Browse files
committed
i2c: glitch high rather than low when tristating SCL+SDA
Avoids accidential start conditions, fixes #405 As a side note, _clk_lo_data_input does generate a negative glitch on SDA (if it was high) before going high-impedance. This behavior is preferable over the alternative (glitching high before going high-impedance), since the device might already be driving low on the bus to provide an ACK and we don't want brief crowbar currents.
1 parent 16398f3 commit 1c5176b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyftdi/i2c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ def _clk_lo_data_lo(self) -> Tuple[int]:
962962
@property
963963
def _clk_input_data_input(self) -> Tuple[int]:
964964
return (Ftdi.SET_BITS_LOW,
965-
self._gpio_low,
965+
self.I2C_DIR | self._gpio_low,
966966
(self._gpio_dir & 0xFF))
967967

968968
@property

0 commit comments

Comments
 (0)