//! Common functions use core::marker::PhantomData; use { Ads1x1x, mode, Error, interface }; use super::super::OperatingMode; impl Ads1x1x where DI: interface::WriteData, { /// Change operating mode to OneShot pub fn into_one_shot(mut self) -> Result, Error> { self.set_operating_mode(OperatingMode::OneShot)?; Ok(Ads1x1x { iface: self.iface, config: self.config, a_conversion_was_started: self.a_conversion_was_started, _conv: PhantomData, _ic: PhantomData, _mode: PhantomData }) } }