Files
micropython/docs/library
Alessandro Gatti 80a9abbf49 extmod/machine_i2c: Add a deinit method to machine.I2C.
This commit adds `.deinit()` to the `machine.I2C` class, bringing it in
line with both the target I2C class variant and the rest of the
peripheral classes.

Ports that want to allocate I²C bus entries dynamically can implement
the `self.deinit()` method to add deallocation/cleanup code, otherwise
this method is entirely optional to have.  If no method is found in the
port-provided object structure then calling `deinit()` on the object
will do nothing, following what the `machine.SPI` object does.

This addresses #19096.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-05-09 00:41:32 +10:00
..
2026-02-07 00:45:04 +11:00