Bus services: Difference between revisions

No edit summary
Line 306: Line 306:
| [1.0.0-5.1.0] 3 || [[#HasDeviceForDev|HasDeviceForDev]]
| [1.0.0-5.1.0] 3 || [[#HasDeviceForDev|HasDeviceForDev]]
|-
|-
| 4 || [6.0.0+]
| 4 || [6.0.0+] [[#OpenSessionWithId|OpenSessionWithId]]
|}
|}


Line 390: Line 390:
== HasDeviceForDev ==
== HasDeviceForDev ==
Takes an u32 '''port''', an u16 '''addr''', an '''AddressingMode''' (1 for 10-bit, 0 otherwise) and a '''SpeedMode''' (400000 or 100000). Returns true if the device exists or false otherwise.
Takes an u32 '''port''', an u16 '''addr''', an '''AddressingMode''' (1 for 10-bit, 0 otherwise) and a '''SpeedMode''' (400000 or 100000). Returns true if the device exists or false otherwise.
== OpenSessionWithId ==
Takes an '''I2cId''' and returns a [[#II2cSession]] session for it.


== II2cSession ==
== II2cSession ==
Line 414: Line 417:


== SendAuto ==
== SendAuto ==
Takes bytes to write in either a static buffer or a receive buffer, returns an error code for success
Takes bytes to write in either a static buffer or a receive buffer, returns an error code for success


== ExecuteCommandListAuto ==
== ExecuteCommandListAuto ==
Takes a command list from either a static buffer or a receive buffer, returns data in either a static (or recieve?) buffer.
Takes a command list from either a static buffer or a receive buffer, returns data in either a static (or recieve?) buffer.


=== Commands ===
=== Commands ===
* 0x40 [u8 len] <bytes> - Write bytes to device
* 0x40 [u8 len] <bytes> - Write bytes to device
* 0xC1 [u8 len] - Receive bytes from device
* 0xC1 [u8 len] - Receive bytes from device