riot_sys

Function i2c_deinit_pins

Source
pub unsafe extern "C" fn i2c_deinit_pins(dev: i2c_t)
Expand description

@brief Change the pins of the given I2C bus back to plain GPIO functionality

The pin mux of the SDA and SCL pins of the bus will be changed back to default (GPIO) mode and the I2C bus is powered off. This allows to use the I2C pins for another function and return to I2C functionality again by calling i2c_init_pins()

If you want the pin to be in a defined state, call gpio_init() on it.

The bus MUST not be acquired before initializing it, as this is handled internally by the i2c_deinit function!

Calls to i2c_acquire() will block until i2c_init_pins() is called.

@note Until this is implemented on all platforms, this requires the periph_i2c_reconfigure feature to be used.

@param[in] dev the device to de-initialize