Implementations#

pw_i2c: Cross-platform I2C API with interactive debugging

To use the pw_i2c API, you need to specify in your build system an implementation of the pw_i2c virtual interface.

Existing implementations#

The following Pigweed modules are ready-made pw_i2c implementations that you can use in your projects:

See Quickstart for build system configuration examples.

Create your own implementation#

If the available implementations don’t meet your needs, you can create your own:

  1. Implement the pw::i2c::Initiator interface. See pw_i2c_rp2040 for an example Raspberry Pi Pico SDK implementation and common_pico.cc for example usage of pw_i2c_rp2040.

  2. In your build system, take a dependency on the pw_i2c API headers. See Quickstart for build system configuration examples.