Open omeh-a opened 1 month ago
@Ivan-Velickovic As a change to what we discussed, I am going to write something a bit more minimal to start. Rather than having a full API which implements blocking or non-blocking semantics, I am going to basically just extract the current logic used in examples to library calls.
I have more important work to move on to and this lets us have the benefit of decoupling the examples from the exact transport logic still. I guess this technically still constitutes a non-blocking API, although due to the lack of completion (i.e. no read/write ops, etc. - just "make token chain", "send token chain" and "unpack response") I will refer to this as something more minimal
I2C operations with our driver look identical in all applications, unless the user is doing something very weird. As a result, it makes sense to extract this logic into a library which can be used by clients to interface with the virtualiser and ensure that they always compose semantically correct I2C transactions. This will also make the driver significantly easier to employ since end users simply can call
I2C_init
and thenread
orwrite
operations as needed.