Struct Channel

Source
pub struct Channel<'d, const UNIT: usize, const NUM: usize> { /* private fields */ }
Available on crate feature unstable only.
Expand description

Represents a channel within a pulse counter unit.

Implementations§

Source§

impl<const UNIT: usize, const NUM: usize> Channel<'_, UNIT, NUM>

Source

pub fn set_ctrl_mode(&self, low: CtrlMode, high: CtrlMode)

Configures how the channel behaves based on the level of the control signal.

  • low - The behaviour of the channel when the control signal is low.
  • high - The behaviour of the channel when the control signal is high.
Source

pub fn set_input_mode(&self, neg_edge: EdgeMode, pos_edge: EdgeMode)

Configures how the channel affects the counter based on the transition made by the input signal.

  • neg_edge - The effect on the counter when the input signal goes 1 -> 0.
  • pos_edge - The effect on the counter when the input signal goes 0 -> 1.
Source

pub fn set_ctrl_signal<P: PeripheralInput>( &self, source: impl Peripheral<P = P>, ) -> &Self

Set the control signal (pin/high/low) for this channel

Source

pub fn set_edge_signal<P: PeripheralInput>( &self, source: impl Peripheral<P = P>, ) -> &Self

Set the edge signal (pin/high/low) for this channel

Auto Trait Implementations§

§

impl<'d, const UNIT: usize, const NUM: usize> Freeze for Channel<'d, UNIT, NUM>

§

impl<'d, const UNIT: usize, const NUM: usize> RefUnwindSafe for Channel<'d, UNIT, NUM>

§

impl<'d, const UNIT: usize, const NUM: usize> !Send for Channel<'d, UNIT, NUM>

§

impl<'d, const UNIT: usize, const NUM: usize> !Sync for Channel<'d, UNIT, NUM>

§

impl<'d, const UNIT: usize, const NUM: usize> Unpin for Channel<'d, UNIT, NUM>

§

impl<'d, const UNIT: usize, const NUM: usize> UnwindSafe for Channel<'d, UNIT, NUM>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.