Struct McPwm

Source
#[non_exhaustive]
pub struct McPwm<'d, PWM> { pub timer0: Timer<0, PWM>, pub timer1: Timer<1, PWM>, pub timer2: Timer<2, PWM>, pub operator0: Operator<'d, 0, PWM>, pub operator1: Operator<'d, 1, PWM>, pub operator2: Operator<'d, 2, PWM>, /* private fields */ }
Available on crate feature unstable only.
Expand description

The MCPWM peripheral

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§timer0: Timer<0, PWM>

Timer0

§timer1: Timer<1, PWM>

Timer1

§timer2: Timer<2, PWM>

Timer2

§operator0: Operator<'d, 0, PWM>

Operator0

§operator1: Operator<'d, 1, PWM>

Operator1

§operator2: Operator<'d, 2, PWM>

Operator2

Implementations§

Source§

impl<'d, PWM: PwmPeripheral> McPwm<'d, PWM>

Source

pub fn new( peripheral: impl Peripheral<P = PWM> + 'd, peripheral_clock: PeripheralClockConfig, ) -> Self

pwm_clk = clocks.crypto_pwm_clock / (prescaler + 1)

Auto Trait Implementations§

§

impl<'d, PWM> Freeze for McPwm<'d, PWM>
where PWM: Freeze,

§

impl<'d, PWM> RefUnwindSafe for McPwm<'d, PWM>
where PWM: RefUnwindSafe,

§

impl<'d, PWM> Send for McPwm<'d, PWM>
where PWM: Send + Sync,

§

impl<'d, PWM> Sync for McPwm<'d, PWM>
where PWM: Sync,

§

impl<'d, PWM> Unpin for McPwm<'d, PWM>
where PWM: Unpin,

§

impl<'d, PWM> !UnwindSafe for McPwm<'d, PWM>

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.