zephyr::raw

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.

@warning It is the responsability 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. @retval -errno For any other errors.