1.3.2.1 How the Library Works

The I2C Bit Bang library is a single-client, single-instance interface.

Working Flow

  • It uses a timer peripheral to generate the I2C waveforms at the configured I2C clock speed

  • The block of data is transferred in a non-blocking manner using the timer peripheral interrupt

  • Application can register a callback to get notified when the I2C transfer is complete

  • Once the transfer is complete, the library calls the callback registered by the application from the timer interrupt context or the application can poll the status of the transfer