[][src]Struct atmega_hal::simple_pwm::Timer2Pwm

pub struct Timer2Pwm { /* fields omitted */ }

Use TC2 for PWM (pins PB3, PD3)

Example

let mut timer2 = Timer2Pwm::new(dp.TC2, Prescaler::Prescale64);

let mut d11 = pins.d11.into_output().into_pwm(&mut timer2);
let mut d3 = pins.d3.into_output().into_pwm(&mut timer2);

d11.set_duty(128);
d11.enable();

Implementations

impl Timer2Pwm[src]

pub fn new(timer: TC2, prescaler: Prescaler) -> Timer2Pwm[src]

Trait Implementations

impl PwmPinOps<Timer2Pwm> for PB3[src]

type Duty = u8

impl PwmPinOps<Timer2Pwm> for PD3[src]

type Duty = u8

Auto Trait Implementations

impl Send for Timer2Pwm[src]

impl !Sync for Timer2Pwm[src]

impl Unpin for Timer2Pwm[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.