An ongoing contemplation of mine is with multi-tasking environments, MCU I/O channels and the devices attached to the I/O channels. In particular with SPI and I2C where multiple external devices may be present.
Do we implement mutexes so that the API handling the external device can lock the I/O channel for exclusive use, or do we have a task that serves the I/O channel, accepts incoming messages and despatches outgoing messages.
In past projects I have gone the mutex path. But there is always time for review.
This is just a reach out hoping to capture response.