No need to look at the actual mutex, just have a volatile bool
i2c_in_use that you set to true after locking the mutex and to false
before releasing it. Then skip the hold switch reading part of the tick
task if that flag is set to true.

Just giving fair warning. :-) If there's no need for actually checking the mutex status in this case then use whatever works.

Mike

Reply via email to