9 Commits

Author SHA1 Message Date
Kevin O'Connor
3219712c17 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>
2025-07-22 14:04:50 -04:00
Kevin O'Connor
b761b8c654 i2c_software: Implement regular timing even on AVR chips
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-07-22 14:04:50 -04:00
Timofey Titovets
a9b04e8536 i2c_software: pass pulse ticks from host
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:41:49 -04:00
Timofey Titovets
841adcfff7 i2c_software: reduce gpio calls count
gpio reset calls are heavy.
gpio state are persistent between calls.
Drop useless calls.
Avoid calls if SDA does not changed.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:41:49 -04:00
Timofey Titovets
8ab12c86bf i2c_software: allow freq adjust
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:41:49 -04:00
Kevin O'Connor
655861cf12 i2c_software: Fix i2c_delay()
The i2c_delay() function did not properly handle counter rollovers.
It also performed an expensive run-time divide.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-08 10:10:25 -04:00
Timofey Titovets
2c246c7d33 i2c_software: forward errors to i2ccmd
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2024-10-26 22:06:30 -04:00
Timofey Titovets
a4aa2a9002 i2c: handle errors at i2ccmds
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2024-10-26 22:06:30 -04:00
BIGTREETECH
645a1b8364
i2c_software: Implementation of software i2c (#6141)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
2023-06-07 20:55:46 -04:00