Function vl53l1::software_reset
source · pub fn software_reset<I, E, D>(
dev: &mut Device,
i2c: &mut I,
d: &mut D
) -> Result<(), E>where
I: WriteRead<Error = E> + Write<Error = E>,
D: Delay,
Expand description
Reset the device.
This function takes at least SOFTWARE_RESET_DURATION + FIRMWARE_BOOT_TIME_US
to complete,
then waits for the given device to reboot only until an additional boot_timeout_ms
completes.
Returns Ok
if the device rebooted successfully.
Returns Err(WouldBlock)
if the boot_timeout_ms
is exceeded.