I am using the i2c adapters (in master mode) for doing asynchronous writes or reads that waits FOREVER for an OS_EVENT to be signalled from the callback.
However instead of waiting FOREVER I want to be able to set a timeout value so that it doesn't get stuck if say there's no device on the bus.
But then after a timeout If I try to initiated another async read or write the adapter hangs because there's (for e.g. 2) pending transactions that are unfinished. How can I cancel these pending transactions or better yet, what's the proper way so that I can use timeouts with ad_i2c_async_read or ad_i2c_async_write.