hololink::emulation::I2CControllerCtxt
hololink::emulation::I2CControllerCtxt
Common, target-invariant per-I2CController context.
Each platform defines its own extension struct (LinuxI2CControllerCtxt, STM32I2CControllerCtxt) with struct ``I2CControllerCtxt`` base as its first member. Standard-layout C++ guarantees &ext->base == reinterpret_cast<I2CControllerCtxt*>(ext), so the I2CController class can hold an I2CControllerCtxt* without knowing the platform extension, and platform code downcasts back via reinterpret_cast<LinuxI2CControllerCtxt*> (or STM32 equivalent) to reach the platform extras.
running is a bare bool: I2C transactions execute synchronously inside the host control-plane callback (i2c_configure_cb -> i2c_transaction), there is no worker thread to coordinate. The Linux extension still carries an i2c_mutex because attach_i2c_peripheral() can be called from the application thread while the control-plane callback is running on its own thread; STM32 is single-threaded and needs no mutex.