Rethink STM32 I2C v2 HAL (#78)
* Initial attempt at rethinking the STM32 I2C v2 HAL.  Makes single-byte work properly and adds a new 'state' variable to track what the hardware is doing.

* Fix some initial test failures

* Fix incorrect logic

* Fix more incorrect logic

* Tabs to spaces

* Fix repeated starts with single-byte API

* Fix race condition causing stop() after nacked address to sometimes break things

* Fix missed i2c structs that should have been removed

* Fix doing a repeated start from single-byte to transaction API causing I2C peripheral to lock up

* Fix xferOperation being set wrong for repeated starts, causing the peripheral to hang

* Fix race condition with repeated start after single-byte operation

* Fix compilation for targets that use I2C IP v1

* Fix initialization of XferOperation for API v1, optimize stop()

* Remove unneeded line

* Add docs for I2C events
ls
1 parent 961632a commit 5b28f5bc963774e1817ff0c3f34e0c827f01aaa9
@Jamie Smith Jamie Smith authored on 20 Nov 2022
GitHub committed on 20 Nov 2022
Showing 17 changed files
View
features/frameworks/unity/source/unity.c
View
hal/include/hal/i2c_api.h
View
targets/TARGET_STM/TARGET_STM32F0/objects.h
View
targets/TARGET_STM/TARGET_STM32F3/objects.h
View
targets/TARGET_STM/TARGET_STM32F7/objects.h
View
targets/TARGET_STM/TARGET_STM32G0/objects.h
View
targets/TARGET_STM/TARGET_STM32G4/objects.h
View
targets/TARGET_STM/TARGET_STM32H7/objects.h
View
targets/TARGET_STM/TARGET_STM32L0/objects.h
View
targets/TARGET_STM/TARGET_STM32L4/objects.h
View
targets/TARGET_STM/TARGET_STM32L5/objects.h
View
targets/TARGET_STM/TARGET_STM32U5/objects.h
View
targets/TARGET_STM/TARGET_STM32WB/objects.h
View
targets/TARGET_STM/TARGET_STM32WL/objects.h
View
targets/TARGET_STM/device.h
View
targets/TARGET_STM/i2c_api.c
View
targets/TARGET_STM/stm_i2c_api.h 0 → 100644