TimerCounterChannel

Struct TimerCounterChannel 

Source
pub struct TimerCounterChannel<TC, CLK, const CH: u8, const FREQ: u32> { /* private fields */ }

Implementations§

Source§

impl<CLK, const CH: u8, const FREQ: u32> TimerCounterChannel<TC0, CLK, CH, FREQ>

Source

pub fn clock_input(&mut self, source: ClockSource)

Set the input clock

Source

pub fn enable_interrupt(&mut self)

Enable the interrupt for this TimerCounterChannel NOTE: The interrupt used will be TC * 3 + CH e.g. TC:1 CH:2 => 1 * 3 + 2 = 5

Source

pub fn disable_interrupt(&mut self)

Disables the interrupt for this TimerCounterChannel

Source

pub fn clear_interrupt_flags(&mut self) -> bool

Clear interrupt status

Source§

impl<CLK, const CH: u8, const FREQ: u32> TimerCounterChannel<TC1, CLK, CH, FREQ>

Source

pub fn clock_input(&mut self, source: ClockSource)

Set the input clock

Source

pub fn enable_interrupt(&mut self)

Enable the interrupt for this TimerCounterChannel NOTE: The interrupt used will be TC * 3 + CH e.g. TC:1 CH:2 => 1 * 3 + 2 = 5

Source

pub fn disable_interrupt(&mut self)

Disables the interrupt for this TimerCounterChannel

Source

pub fn clear_interrupt_flags(&mut self) -> bool

Clear interrupt status

Source§

impl<CLK, const CH: u8, const FREQ: u32> TimerCounterChannel<TC2, CLK, CH, FREQ>

Source

pub fn clock_input(&mut self, source: ClockSource)

Set the input clock

Source

pub fn enable_interrupt(&mut self)

Enable the interrupt for this TimerCounterChannel NOTE: The interrupt used will be TC * 3 + CH e.g. TC:1 CH:2 => 1 * 3 + 2 = 5

Source

pub fn disable_interrupt(&mut self)

Disables the interrupt for this TimerCounterChannel

Source

pub fn clear_interrupt_flags(&mut self) -> bool

Clear interrupt status

Trait Implementations§

Source§

impl<CLK, const CH: u8, const FREQ: u32> CountDown for TimerCounterChannel<TC0, CLK, CH, FREQ>

Source§

type Time = Duration<u32, 1, FREQ>

The unit of time used by this timer
Source§

fn start<T>(&mut self, timeout: T)
where T: Into<Self::Time>,

Starts a new count down
Source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
Source§

impl<CLK, const CH: u8, const FREQ: u32> CountDown for TimerCounterChannel<TC1, CLK, CH, FREQ>

Source§

type Time = Duration<u32, 1, FREQ>

The unit of time used by this timer
Source§

fn start<T>(&mut self, timeout: T)
where T: Into<Self::Time>,

Starts a new count down
Source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
Source§

impl<CLK, const CH: u8, const FREQ: u32> CountDown for TimerCounterChannel<TC2, CLK, CH, FREQ>

Source§

type Time = Duration<u32, 1, FREQ>

The unit of time used by this timer
Source§

fn start<T>(&mut self, timeout: T)
where T: Into<Self::Time>,

Starts a new count down
Source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
Source§

impl<CLK, const CH: u8, const FREQ: u32> Periodic for TimerCounterChannel<TC0, CLK, CH, FREQ>

Source§

impl<CLK, const CH: u8, const FREQ: u32> Periodic for TimerCounterChannel<TC1, CLK, CH, FREQ>

Source§

impl<CLK, const CH: u8, const FREQ: u32> Periodic for TimerCounterChannel<TC2, CLK, CH, FREQ>

Auto Trait Implementations§

§

impl<TC, CLK, const CH: u8, const FREQ: u32> Freeze for TimerCounterChannel<TC, CLK, CH, FREQ>

§

impl<TC, CLK, const CH: u8, const FREQ: u32> RefUnwindSafe for TimerCounterChannel<TC, CLK, CH, FREQ>
where CLK: RefUnwindSafe, TC: RefUnwindSafe,

§

impl<TC, CLK, const CH: u8, const FREQ: u32> Send for TimerCounterChannel<TC, CLK, CH, FREQ>
where CLK: Send, TC: Send,

§

impl<TC, CLK, const CH: u8, const FREQ: u32> Sync for TimerCounterChannel<TC, CLK, CH, FREQ>
where CLK: Sync, TC: Sync,

§

impl<TC, CLK, const CH: u8, const FREQ: u32> Unpin for TimerCounterChannel<TC, CLK, CH, FREQ>
where CLK: Unpin, TC: Unpin,

§

impl<TC, CLK, const CH: u8, const FREQ: u32> UnwindSafe for TimerCounterChannel<TC, CLK, CH, FREQ>
where CLK: UnwindSafe, TC: 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.