I2C - unify i2cUnstick implementation, improve unstick a bit (#13541)
commit76178a232fa6d021377fd2361e39df4421b2fab4
authorPetr Ledvina <ledvinap@gmail.com>
Sat, 20 Apr 2024 15:07:53 +0000 (20 17:07 +0200)
committerGitHub <noreply@github.com>
Sat, 20 Apr 2024 15:07:53 +0000 (20 17:07 +0200)
tree98c9fb925f419b2fe0921bf468eef2d932695a43
parent723cfe0da7b609ad94d1e33766cc41bf6670c5ef
I2C - unify i2cUnstick implementation, improve unstick a bit (#13541)

* I2C - unify i2cUnstick implemntation, improve unstick a bit

Three copies were spread in I2C implementations.

- i2cUnstick is a bit more carefull about clock stretching
- bus status is returned (return true when bus in idle state)

* fixup! I2C - unify i2cUnstick implemntation, improve unstick a bit

* fixup! I2C - unify i2cUnstick implemntation, improve unstick a bit

---------

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
mk/source.mk
src/main/drivers/at32/bus_i2c_atbsp_init.c
src/main/drivers/bus_i2c_utils.c [new file with mode: 0644]
src/main/drivers/bus_i2c_utils.h [new file with mode: 0644]
src/main/drivers/stm32/bus_i2c_hal_init.c
src/main/drivers/stm32/bus_i2c_stm32f4xx.c