I2C Device Class
This is a generic class which abstracts bit and byte I2C R/W functions. It is part of The I2C Device Library.
There are examples in many of the classes that demonstrate basic usage patterns. The I2Cdev class is built to be used statically, reducing the memory requirement if you have multiple I2C devices in your project. Only one instance of the I2Cdev class is required.
https://github.com/jrowberg/i2cdevlib.git
References
Used by
HMC5883L Compass Library
MPU6050 Gyro / Accelerometer Library
SoC support
esp32
esp32c2
esp32c3
esp32s2
esp32s3
esp8266
host
rp2040