pub struct LoadSwitch<'a, L: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, S1: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, S2: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, EN1: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, EN2: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, DIA: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin>where
&'a mut L: Default,
&'a mut S1: Default,
&'a mut S2: Default,
&'a mut EN1: Default,
&'a mut EN2: Default,
&'a mut DIA: Default,{ /* private fields */ }Implementations§
Source§impl<L: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, S1: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, S2: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, EN1: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, EN2: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, DIA: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin> LoadSwitch<'static, L, S1, S2, EN1, EN2, DIA>
impl<L: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, S1: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, S2: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, EN1: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, EN2: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin, DIA: Pin + _embedded_hal_digital_OutputPin + _embedded_hal_digital_ToggleableOutputPin> LoadSwitch<'static, L, S1, S2, EN1, EN2, DIA>
pub fn new( latch_pin: &'static mut L, sel1_pin: Option<&'static mut S1>, sel2_pin: Option<&'static mut S2>, en1_pin: &'static mut EN1, en2_pin: &'static mut EN2, dia_pin: &'static mut DIA, latching: bool, k_sns_value: f64, r_sns_value: f64, overcurrent_threshold: [f64; 2], min_expected_current: [f64; 2], ) -> Self
pub fn channel_on(&mut self, channel: LoadSwitchChannel)
pub fn channel_off(&mut self, channel: LoadSwitchChannel)
pub fn update_sns(&mut self, sns_voltage: f64, step_sel: bool)
Auto Trait Implementations§
impl<'a, L, S1, S2, EN1, EN2, DIA> Freeze for LoadSwitch<'a, L, S1, S2, EN1, EN2, DIA>where
&'a mut DIA: Sized,
&'a mut EN2: Sized,
&'a mut EN1: Sized,
&'a mut S2: Sized,
&'a mut S1: Sized,
&'a mut L: Sized,
impl<'a, L, S1, S2, EN1, EN2, DIA> RefUnwindSafe for LoadSwitch<'a, L, S1, S2, EN1, EN2, DIA>where
&'a mut DIA: Sized,
&'a mut EN2: Sized,
&'a mut EN1: Sized,
&'a mut S2: Sized,
&'a mut S1: Sized,
&'a mut L: Sized,
L: RefUnwindSafe,
S1: RefUnwindSafe,
S2: RefUnwindSafe,
EN1: RefUnwindSafe,
EN2: RefUnwindSafe,
DIA: RefUnwindSafe,
impl<'a, L, S1, S2, EN1, EN2, DIA> Send for LoadSwitch<'a, L, S1, S2, EN1, EN2, DIA>where
&'a mut DIA: Sized,
&'a mut EN2: Sized,
&'a mut EN1: Sized,
&'a mut S2: Sized,
&'a mut S1: Sized,
&'a mut L: Sized,
L: Send,
S1: Send,
S2: Send,
EN1: Send,
EN2: Send,
DIA: Send,
impl<'a, L, S1, S2, EN1, EN2, DIA> Sync for LoadSwitch<'a, L, S1, S2, EN1, EN2, DIA>where
&'a mut DIA: Sized,
&'a mut EN2: Sized,
&'a mut EN1: Sized,
&'a mut S2: Sized,
&'a mut S1: Sized,
&'a mut L: Sized,
L: Sync,
S1: Sync,
S2: Sync,
EN1: Sync,
EN2: Sync,
DIA: Sync,
impl<'a, L, S1, S2, EN1, EN2, DIA> Unpin for LoadSwitch<'a, L, S1, S2, EN1, EN2, DIA>where
&'a mut DIA: Sized,
&'a mut EN2: Sized,
&'a mut EN1: Sized,
&'a mut S2: Sized,
&'a mut S1: Sized,
&'a mut L: Sized,
L: Unpin,
S1: Unpin,
S2: Unpin,
EN1: Unpin,
EN2: Unpin,
DIA: Unpin,
impl<'a, L, S1, S2, EN1, EN2, DIA> !UnwindSafe for LoadSwitch<'a, L, S1, S2, EN1, EN2, DIA>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more