Struct HrCapt

Source
pub struct HrCapt<TIM, PSCL, CH, DMA> { /* private fields */ }

Implementations§

Source§

impl<TIM: InstanceX, CH: ChExt, PSCL> HrCapt<TIM, PSCL, CH, NoDma>

Source

pub fn add_event<E: CaptureEvent<TIM, PSCL>>(&mut self, _event: &E)

Add event to capture

If multiple events are added, they will be ORed together meaning that a capture will be trigger if any one of the events triggers

Source

pub fn remove_event<E: CaptureEvent<TIM, PSCL>>(&mut self, _event: &E)

Remove event to capture

Source

pub fn trigger_now(&mut self)

Force capture trigger now

Source

pub fn enable_interrupt(&mut self, enable: bool, _hr_control: &mut HrPwmControl)

Source

pub fn enable_dma(self, _ch: DmaChannel<TIM>) -> HrCapt<TIM, PSCL, CH, Dma>

Trait Implementations§

Source§

impl<TIM: InstanceX, CH: ChExt, PSCL, DMA> HrCapture for HrCapt<TIM, PSCL, CH, DMA>

Source§

fn get_last(&self) -> (u16, CountingDirection)

Source§

fn clear_interrupt(&mut self)

Source§

fn is_pending(&self) -> bool

Source§

fn get(&mut self) -> Option<(u16, CountingDirection)>

Try to get the capture value Read more
Source§

fn get_signed(&mut self, period: u16) -> Option<i32>

Get number of ticks relative to beginning of up counting Read more
Source§

fn get_last_signed(&self, period: u16) -> i32

Get number of ticks relative to beginning of up counting Read more

Auto Trait Implementations§

§

impl<TIM, PSCL, CH, DMA> Freeze for HrCapt<TIM, PSCL, CH, DMA>

§

impl<TIM, PSCL, CH, DMA> RefUnwindSafe for HrCapt<TIM, PSCL, CH, DMA>

§

impl<TIM, PSCL, CH, DMA> Send for HrCapt<TIM, PSCL, CH, DMA>
where TIM: Send, PSCL: Send, CH: Send, DMA: Send,

§

impl<TIM, PSCL, CH, DMA> Sync for HrCapt<TIM, PSCL, CH, DMA>
where TIM: Sync, PSCL: Sync, CH: Sync, DMA: Sync,

§

impl<TIM, PSCL, CH, DMA> Unpin for HrCapt<TIM, PSCL, CH, DMA>
where TIM: Unpin, PSCL: Unpin, CH: Unpin, DMA: Unpin,

§

impl<TIM, PSCL, CH, DMA> UnwindSafe for HrCapt<TIM, PSCL, CH, DMA>
where TIM: UnwindSafe, PSCL: UnwindSafe, CH: UnwindSafe, DMA: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.