Identifying timers in CMB_setTimeout_*()

Discussion created by mbr0wn on Mar 10, 2017
Latest reply on Mar 16, 2017 by gverma
When running multiple Mykonos chips from the same software stack, we need to distinguish which chip we're talking to. For the most part, that works fine, because the driver requires us to pass in mykonosDevice_t or spiSettings_t structs.
The one case where this is not possible is in CMB_setTimeout_ms() and CMB_hasTimeoutExpired(). They take no arguments that let us differentiate between chips. So, if we're running stuff on both chips at the same time, and controlling them from different threads, using a global timer could be problematic (the first thread's timeout value would overwrite the second thread's).


I've noticed that the Mykonos Linux kernel driver has similar problems. The chip selection is solved in a similar fashion as we have, but there is a single global timer for the timeouts.


If these calls would have some identifier, we could easily solve this in the implementation of those API calls.
Are there plans to update the API to allow to differentiate between timers?