au-ts / sddf

A collection of interfaces, libraries and tools for writing device drivers for seL4 that allow accessing devices securely and with low overhead.
Other
17 stars 14 forks source link

I2C: User-facing interface library #211

Open omeh-a opened 1 month ago

omeh-a commented 1 month ago

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 then read or write operations as needed.

omeh-a commented 2 weeks 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