atsamd_hal::timer

Trait AsyncCount16

Source
pub trait AsyncCount16: Count16 + Sealed {
    type Interrupt: Interrupt;

    const STATE_ID: usize;

    // Required method
    fn reg_block(peripherals: &Peripherals) -> &RegisterBlock;
}
Expand description

Trait enabling the use of a Timer/Counter in async mode. Specifically, this trait enables us to register a TC* interrupt as a waker for timer futures.

⚠️ Warning This trait should not be implemented outside of this crate!

Required Associated Constants§

Source

const STATE_ID: usize

Index of this TC in the STATE tracker

Required Associated Types§

Source

type Interrupt: Interrupt

Interrupt type for this timer

Required Methods§

Source

fn reg_block(peripherals: &Peripherals) -> &RegisterBlock

Get a reference to the timer’s register block

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AsyncCount16 for Tc1

Implementors§