hololink::emulation::LinuxI2CControllerCtxt

View as Markdown

Linux-specific I2CControllerCtxt extension.

base (the common I2CControllerCtxt) is the first member; the rest is Linux-only state.

Note: there is no worker thread, condition variable, or cmd/peripheral_address scratch state. The host-driven I2C transaction path is fully synchronous now — common/i2c.cpp’s i2c_configure_cb calls i2c_transaction(…) directly inside the control-plane callback. The mutex still exists because attach_i2c_peripheral() may be called from the application thread while i2c_transaction is running on the control-plane thread; both read/write i2c_bus_map.

#include <hololink/emulation/i2c.hpp>

Member variables

NameTypeDescription
baseI2CControllerCtxt
i2c_bus_mapstd::unordered_map< uint32_t, std::unordered_map< uint16_t, I2CPeripheral * > >
i2c_mutexstd::mutex