pub struct Timer3Pwm { /* private fields */ }
Expand description

Use TC3 for PWM (pins PE3, PE4, PE5)

§Example

let mut timer3 = Timer3Pwm::new(dp.TC3, Prescaler::Prescale64);

let mut d5 = pins.d5.into_output().into_pwm(&mut timer3);
let mut d2 = pins.d2.into_output().into_pwm(&mut timer3);
let mut d3 = pins.d3.into_output().into_pwm(&mut timer3);

d5.set_duty(128);
d5.enable();

Implementations§

source§

impl Timer3Pwm

source

pub fn new(timer: TC3, prescaler: Prescaler) -> Timer3Pwm

Trait Implementations§

source§

impl PwmPinOps<Timer3Pwm> for PE3

§

type Duty = u8

source§

fn enable(&mut self)

source§

fn disable(&mut self)

source§

fn get_duty(&self) -> <PE3 as PwmPinOps<Timer3Pwm>>::Duty

source§

fn get_max_duty(&self) -> <PE3 as PwmPinOps<Timer3Pwm>>::Duty

source§

fn set_duty(&mut self, duty: <PE3 as PwmPinOps<Timer3Pwm>>::Duty)

source§

impl PwmPinOps<Timer3Pwm> for PE4

§

type Duty = u8

source§

fn enable(&mut self)

source§

fn disable(&mut self)

source§

fn get_duty(&self) -> <PE4 as PwmPinOps<Timer3Pwm>>::Duty

source§

fn get_max_duty(&self) -> <PE4 as PwmPinOps<Timer3Pwm>>::Duty

source§

fn set_duty(&mut self, duty: <PE4 as PwmPinOps<Timer3Pwm>>::Duty)

source§

impl PwmPinOps<Timer3Pwm> for PE5

§

type Duty = u8

source§

fn enable(&mut self)

source§

fn disable(&mut self)

source§

fn get_duty(&self) -> <PE5 as PwmPinOps<Timer3Pwm>>::Duty

source§

fn get_max_duty(&self) -> <PE5 as PwmPinOps<Timer3Pwm>>::Duty

source§

fn set_duty(&mut self, duty: <PE5 as PwmPinOps<Timer3Pwm>>::Duty)

Auto Trait Implementations§

§

impl Freeze for Timer3Pwm

§

impl RefUnwindSafe for Timer3Pwm

§

impl Send for Timer3Pwm

§

impl !Sync for Timer3Pwm

§

impl Unpin for Timer3Pwm

§

impl UnwindSafe for Timer3Pwm

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.