Struct capsules_core::virtualizers::virtual_pwm::PwmPinUser

source ·
pub struct PwmPinUser<'a, P: Pwm> { /* private fields */ }

Implementations§

source§

impl<'a, P: Pwm> PwmPinUser<'a, P>

source

pub const fn new(mux: &'a MuxPwm<'a, P>, pin: P::Pin) -> PwmPinUser<'a, P>

source

pub fn add_to_mux(&'a self)

Trait Implementations§

source§

impl<'a, P: Pwm> ListNode<'a, PwmPinUser<'a, P>> for PwmPinUser<'a, P>

source§

fn next(&'a self) -> &'a ListLink<'a, PwmPinUser<'a, P>>

source§

impl<P: Pwm> PwmPin for PwmPinUser<'_, P>

source§

fn start(&self, frequency_hz: usize, duty_cycle: usize) -> Result<(), ErrorCode>

Start a PWM output. Same as the start function in the Pwm trait.
source§

fn stop(&self) -> Result<(), ErrorCode>

Stop a PWM output. Same as the stop function in the Pwm trait.
source§

fn get_maximum_frequency_hz(&self) -> usize

Return the maximum PWM frequency supported by the PWM implementation. Same as the get_maximum_frequency_hz function in the Pwm trait.
source§

fn get_maximum_duty_cycle(&self) -> usize

Return an opaque number that represents a 100% duty cycle. This value Same as the get_maximum_duty_cycle function in the Pwm trait.

Auto Trait Implementations§

§

impl<'a, P> !Freeze for PwmPinUser<'a, P>

§

impl<'a, P> !RefUnwindSafe for PwmPinUser<'a, P>

§

impl<'a, P> !Send for PwmPinUser<'a, P>

§

impl<'a, P> !Sync for PwmPinUser<'a, P>

§

impl<'a, P> Unpin for PwmPinUser<'a, P>
where <P as Pwm>::Pin: Unpin,

§

impl<'a, P> !UnwindSafe for PwmPinUser<'a, P>

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>,

§

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>,

§

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.