diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2025-07-14 14:39:15 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2025-07-22 14:04:50 -0400 |
commit | 3219712c1715f5d84f23b5b7fc406812bc2bc6db (patch) | |
tree | 1360ae76c9466294c0532c3b2338369a40e77b71 | |
parent | b761b8c65439262ec94572e09d38ae9024869f01 (diff) | |
download | kutter-3219712c1715f5d84f23b5b7fc406812bc2bc6db.tar.gz kutter-3219712c1715f5d84f23b5b7fc406812bc2bc6db.tar.xz kutter-3219712c1715f5d84f23b5b7fc406812bc2bc6db.zip |
i2c_software: Place wires in high impedance state after setup
Don't leave the wires in a high output state during setup - leave them
in a high-impedance with pullup state.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/i2c_software.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/i2c_software.c b/src/i2c_software.c index d2072a56..ffbf754f 100644 --- a/src/i2c_software.c +++ b/src/i2c_software.c @@ -28,10 +28,10 @@ command_i2c_set_sw_bus(uint32_t *args) struct i2c_software *is = alloc_chunk(sizeof(*is)); is->ticks = args[3]; is->addr = (args[4] & 0x7f) << 1; // address format shifted - is->scl_in = gpio_in_setup(args[1], 1); is->scl_out = gpio_out_setup(args[1], 1); - is->sda_in = gpio_in_setup(args[2], 1); + is->scl_in = gpio_in_setup(args[1], 1); is->sda_out = gpio_out_setup(args[2], 1); + is->sda_in = gpio_in_setup(args[2], 1); i2cdev_set_software_bus(i2c, is); } DECL_COMMAND(command_i2c_set_sw_bus, |