#[non_exhaustive]pub struct HrPwmCtrl;
Expand description
Used as a token to guarantee unique access to resources common to multiple timers
An instance of this object can be obtained from HrPwmControl
.control
Implementations§
Source§impl HrPwmCtrl
impl HrPwmCtrl
Sourcepub fn start_stop_timers(&mut self, p: impl FnOnce(Foo<'_>) -> Foo<'_>)
pub fn start_stop_timers(&mut self, p: impl FnOnce(Foo<'_>) -> Foo<'_>)
Start/stop multiple timers at the exact same time
let mut timer_a = ...;
let mut timer_b = ...;
let mut timer_c = ...;
hr_control.start_stop_timers(|w| w
.start(&mut timer_a)
.start(&mut timer_b)
.stop(&mut timer_c)
);
Trait Implementations§
Source§impl<'a> From<&'a mut HrPwmControl> for &'a mut HrPwmCtrl
impl<'a> From<&'a mut HrPwmControl> for &'a mut HrPwmCtrl
Source§fn from(val: &'a mut HrPwmControl) -> Self
fn from(val: &'a mut HrPwmControl) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HrPwmCtrl
impl RefUnwindSafe for HrPwmCtrl
impl Send for HrPwmCtrl
impl Sync for HrPwmCtrl
impl Unpin for HrPwmCtrl
impl UnwindSafe for HrPwmCtrl
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