The asynchronous API allows you to run I²C operations in the background. This API is only available if your device has the `I2C_ASYNCH` feature. To use this API, use [`I2C::transfer()`](https://mbed-ce.github.io/mbed-os/classmbed_1_1_i2_c.html#a273f3dc6765aea3f2bdca0e70ae9697c) to start an operation and [`I2C::abort_transfer()`](https://mbed-ce.github.io/mbed-os/classmbed_1_1_i2_c.html#a90253410d768f60403698f5f383d1931) to stop it. Alternately, use the [`I2C::transfer_and_wait()`](https://mbed-ce.github.io/mbed-os/classmbed_1_1_i2_c.html#a273c521d9f320d5c1b84975af701890f) function to block the current thread until the transfer finishes.
0 commit comments