|
| | StmI2cDevice (StmI2cBus *parent, const hf_i2c_device_config_t &config) noexcept |
| |
| | ~StmI2cDevice () noexcept override |
| |
| bool | Initialize () noexcept override |
| | Initialize the I2C bus.
|
| |
| bool | Deinitialize () noexcept override |
| | Deinitialize the I2C bus.
|
| |
| hf_i2c_err_t | Write (const hf_u8_t *data, hf_u16_t length, hf_u32_t timeout_ms=0) noexcept override |
| | Write data to the I2C device.
|
| |
| hf_i2c_err_t | Read (hf_u8_t *data, hf_u16_t length, hf_u32_t timeout_ms=0) noexcept override |
| | Read data from the I2C device.
|
| |
| hf_i2c_err_t | WriteRead (const hf_u8_t *tx_data, hf_u16_t tx_length, hf_u8_t *rx_data, hf_u16_t rx_length, hf_u32_t timeout_ms=0) noexcept override |
| | Write then read data from the I2C device.
|
| |
| hf_u16_t | GetDeviceAddress () const noexcept override |
| | Get the device address for this I2C device.
|
| |
| const hf_i2c_device_config_t & | GetConfig () const noexcept |
| | Get the device configuration.
|
| |
| StmI2cBus * | GetParentBus () const noexcept |
| | Get the parent bus.
|
| |
| virtual | ~BaseI2c () noexcept=default |
| | Virtual destructor ensures proper cleanup in derived classes.
|
| |
| | BaseI2c (const BaseI2c &)=delete |
| |
| BaseI2c & | operator= (const BaseI2c &)=delete |
| |
| | BaseI2c (BaseI2c &&)=delete |
| |
| BaseI2c & | operator= (BaseI2c &&)=delete |
| |
| bool | EnsureInitialized () noexcept |
| | Ensures that the I2C bus is initialized (lazy initialization).
|
| |
| bool | EnsureDeinitialized () noexcept |
| | Ensures that the I2C bus is deinitialized (lazy deinitialization).
|
| |
| bool | IsInitialized () const noexcept |
| | Checks if the bus is initialized.
|
| |
| virtual bool | Open () noexcept |
| | Open the I2C bus (alias for Initialize).
|
| |
| virtual bool | Close () noexcept |
| | Close the I2C bus (alias for Deinitialize).
|
| |
| virtual bool | IsDevicePresent () noexcept |
| | Check if this device is present on the bus.
|
| |
| virtual bool | ProbeDevice () noexcept |
| | Probe if this device is present on the bus (alias for IsDevicePresent).
|
| |
| virtual bool | WriteByte (hf_u8_t data) noexcept |
| | Write a single byte to the I2C device.
|
| |
| virtual bool | ReadByte (hf_u8_t &data) noexcept |
| | Read a single byte from the I2C device.
|
| |
| virtual bool | WriteRegister (hf_u8_t reg_addr, hf_u8_t data) noexcept |
| | Write to a register on the I2C device.
|
| |
| virtual bool | ReadRegister (hf_u8_t reg_addr, hf_u8_t &data) noexcept |
| | Read from a register on the I2C device.
|
| |
| virtual bool | ReadRegisters (hf_u8_t reg_addr, hf_u8_t *data, hf_u16_t length) noexcept |
| | Read multiple registers from the I2C device.
|
| |
| virtual hf_i2c_err_t | ResetStatistics () noexcept |
| | Reset I2C operation statistics.
|
| |
| virtual hf_i2c_err_t | ResetDiagnostics () noexcept |
| | Reset I2C diagnostic information.
|
| |
| virtual hf_i2c_err_t | GetStatistics (hf_i2c_statistics_t &statistics) const noexcept |
| | Get I2C operation statistics.
|
| |
| virtual hf_i2c_err_t | GetDiagnostics (hf_i2c_diagnostics_t &diagnostics) const noexcept |
| | Get I2C diagnostic information.
|
| |
STM32 I2C device — inherits BaseI2c, delegates I/O to parent bus HAL handle.
Each device represents one slave address on the bus. The parent bus manages the I2C_HandleTypeDef* and provides the HAL layer.