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>
impl<'a, P: Pwm> PwmPinUser<'a, P>
pub const fn new(mux: &'a MuxPwm<'a, P>, pin: P::Pin) -> PwmPinUser<'a, P>
pub fn add_to_mux(&'a self)
Trait Implementations§
source§impl<'a, P: Pwm> ListNode<'a, PwmPinUser<'a, P>> for PwmPinUser<'a, P>
impl<'a, P: Pwm> ListNode<'a, PwmPinUser<'a, P>> for PwmPinUser<'a, P>
fn next(&'a self) -> &'a ListLink<'a, PwmPinUser<'a, P>>
source§impl<P: Pwm> PwmPin for PwmPinUser<'_, P>
impl<P: Pwm> PwmPin for PwmPinUser<'_, P>
source§fn start(&self, frequency_hz: usize, duty_cycle: usize) -> Result<(), ErrorCode>
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>
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
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
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>
impl<'a, P> !UnwindSafe for PwmPinUser<'a, P>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more