|
| LinuxInitiator (int fd) |
|
| LinuxInitiator (const LinuxInitiator &)=delete |
|
LinuxInitiator & | operator= (const LinuxInitiator &)=delete |
|
constexpr | Initiator () |
|
constexpr | Initiator (Feature supported_features) |
|
Status | WriteReadFor (Address device_address, ConstByteSpan tx_buffer, ByteSpan rx_buffer, chrono::SystemClock::duration timeout) |
|
Status | TransferFor (span< const Message > messages, chrono::SystemClock::duration timeout) |
|
Status | WriteReadFor (Address device_address, const void *tx_buffer, size_t tx_size_bytes, void *rx_buffer, size_t rx_size_bytes, chrono::SystemClock::duration timeout) |
|
Status | WriteFor (Address device_address, ConstByteSpan tx_buffer, chrono::SystemClock::duration timeout) |
|
Status | WriteFor (Address device_address, const void *tx_buffer, size_t tx_size_bytes, chrono::SystemClock::duration timeout) |
|
Status | ReadFor (Address device_address, ByteSpan rx_buffer, chrono::SystemClock::duration timeout) |
|
Status | ReadFor (Address device_address, void *rx_buffer, size_t rx_size_bytes, chrono::SystemClock::duration timeout) |
|
Status | ProbeDeviceFor (Address device_address, chrono::SystemClock::duration timeout) |
|
Initiator interface implementation using the Linux userspace i2c-dev driver.
Takes exclusive control of an I2C bus device (ex. "/dev/i2c-0"). The user is responsible to open the device node prior to creating the initiator. The file descriptor is closed when the initiator object is destroyed.
The bus device must support the full I2C functionality. Users of the class are encouraged to use the OpenI2cBus
helper to ensure the bus is valid.
Access to the bus is guarded by an internal mutex, so this initiator can be safely used from multiple threads.