Hello,
In the Documentation for the new I2C driver, it says this:
Thread Safety
The factory function i2c_new_master_bus() and i2c_new_slave_device() are guaranteed to be thread safe by the driver, which means, user can call them from different RTOS tasks without protection by extra locks. Other public I2C APIs are not thread safe. which means the user should avoid calling them from multiple tasks, if user strongly needs to call them in multiple tasks, please add extra lock.
Does this mean that only i2c_new_master_bus() and i2c_new_slave_device() are thread safe, and all other I2C functions are not thread safe?
Regards,
Dragan
Thread safety of a new I2C driver on ESP IDF v5.2
Re: Thread safety of a new I2C driver on ESP IDF v5.2
Yes, that's my understanding. I need to consider this as I want to upgrade from the legacy driver. I have been using https://github.com/ropg/i2c_manager as a thread-safe wrapper of the legacy driver.
Who is online
Users browsing this forum: Gaston1980 and 160 guests