pub struct OnePulseChannel<'d, T: GeneralInstance4Channel> { /* private fields */ }
Expand description
A single channel of a one pulse-configured timer, obtained from
OnePulse::split
,OnePulse::channel
, OnePulse::ch1
, etc.
It is not possible to change the pulse end tick because the end tick configuration is shared with all four channels.
Implementations§
Source§impl<'d, T: GeneralInstance4Channel> OnePulseChannel<'d, T>
impl<'d, T: GeneralInstance4Channel> OnePulseChannel<'d, T>
Sourcepub fn pulse_width(&mut self) -> u32
pub fn pulse_width(&mut self) -> u32
Get the width of the pulse in ticks.
Sourcepub fn pulse_delay(&mut self) -> u32
pub fn pulse_delay(&mut self) -> u32
Get the start of the pulse in ticks from the trigger.
Sourcepub fn set_pulse_delay(&mut self, delay: u32)
pub fn set_pulse_delay(&mut self, delay: u32)
Set the start of the pulse in ticks from the trigger.
Sourcepub fn set_pulse_width(&mut self, width: u32)
pub fn set_pulse_width(&mut self, width: u32)
Set the pulse width in ticks.
Sourcepub async fn wait_for_pulse_start(&mut self)
pub async fn wait_for_pulse_start(&mut self)
Waits until the trigger and following delay has passed.
Auto Trait Implementations§
impl<'d, T> Freeze for OnePulseChannel<'d, T>where
T: Freeze,
impl<'d, T> RefUnwindSafe for OnePulseChannel<'d, T>where
T: RefUnwindSafe,
impl<'d, T> Send for OnePulseChannel<'d, T>where
T: Send,
impl<'d, T> Sync for OnePulseChannel<'d, T>where
T: Sync,
impl<'d, T> Unpin for OnePulseChannel<'d, T>where
T: Unpin,
impl<'d, T> !UnwindSafe for OnePulseChannel<'d, T>
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