Function device_deinit

Source
pub unsafe extern "C" fn device_deinit(dev: *const device) -> i32
Expand description

@brief De-initialize a device.

When a device is de-initialized, it will release any resources it has acquired (e.g. pins, memory, clocks, DMA channels, etc.) and its status will be left as in its reset state.

Note: this will be available if CONFIG_DEVICE_DEINIT_SUPPORT is enabled.

@warning It is the responsibility of the caller to ensure that the device is ready to be de-initialized.

@param dev device to be de-initialized.

@retval 0 If successful @retval -EPERM If device has not been initialized. @retval -ENOTSUP If device does not support de-initialization, or if the feature is not enabled (see CONFIG_DEVICE_DEINIT_SUPPORT) @retval -errno For any other errors.