pub struct ErasedChannel<TIM> { /* private fields */ }
Implementations§
Source§impl<TIM: Instance + WithPwm> ErasedChannel<TIM>
impl<TIM: Instance + WithPwm> ErasedChannel<TIM>
Sourcepub fn get_max_duty(&self) -> u16
pub fn get_max_duty(&self) -> u16
Get the maximum duty cycle value of the PWM channel
If 0
returned means max_duty is 2^16
Sourcepub fn set_polarity(&mut self, p: Polarity)
pub fn set_polarity(&mut self, p: Polarity)
Set PWM channel polarity
Sourcepub fn set_complementary_polarity(&mut self, p: Polarity)
pub fn set_complementary_polarity(&mut self, p: Polarity)
Set complementary PWM channel polarity
Source§impl<TIM: Instance + WithPwm + Advanced> ErasedChannel<TIM>
impl<TIM: Instance + WithPwm + Advanced> ErasedChannel<TIM>
Sourcepub fn disable_complementary(&mut self)
pub fn disable_complementary(&mut self)
Disable complementary PWM channel
Sourcepub fn enable_complementary(&mut self)
pub fn enable_complementary(&mut self)
Enable complementary PWM channel
Sourcepub fn set_idle_state(&mut self, s: IdleState)
pub fn set_idle_state(&mut self, s: IdleState)
Set PWM channel idle state
Sourcepub fn set_complementary_idle_state(&mut self, s: IdleState)
pub fn set_complementary_idle_state(&mut self, s: IdleState)
Set complementary PWM channel idle state
Trait Implementations§
Source§impl<TIM: Instance + WithPwm> ErrorType for ErasedChannel<TIM>
impl<TIM: Instance + WithPwm> ErrorType for ErasedChannel<TIM>
Source§type Error = Infallible
type Error = Infallible
Error type
Source§impl<TIM: Instance + WithPwm> PwmPin for ErasedChannel<TIM>
impl<TIM: Instance + WithPwm> PwmPin for ErasedChannel<TIM>
Source§fn get_max_duty(&self) -> Self::Duty
fn get_max_duty(&self) -> Self::Duty
Returns the maximum duty cycle value
Source§impl<TIM: Instance + WithPwm> SetDutyCycle for ErasedChannel<TIM>
impl<TIM: Instance + WithPwm> SetDutyCycle for ErasedChannel<TIM>
Source§fn max_duty_cycle(&self) -> u16
fn max_duty_cycle(&self) -> u16
Get the maximum duty cycle value. Read more
Source§fn set_duty_cycle(&mut self, duty: u16) -> Result<(), Self::Error>
fn set_duty_cycle(&mut self, duty: u16) -> Result<(), Self::Error>
Set the duty cycle to
duty / max_duty
. Read moreSource§fn set_duty_cycle_fully_off(&mut self) -> Result<(), Self::Error>
fn set_duty_cycle_fully_off(&mut self) -> Result<(), Self::Error>
Set the duty cycle to 0%, or always inactive.
Source§fn set_duty_cycle_fully_on(&mut self) -> Result<(), Self::Error>
fn set_duty_cycle_fully_on(&mut self) -> Result<(), Self::Error>
Set the duty cycle to 100%, or always active.
Auto Trait Implementations§
impl<TIM> Freeze for ErasedChannel<TIM>where
TIM: Freeze,
impl<TIM> RefUnwindSafe for ErasedChannel<TIM>where
TIM: RefUnwindSafe,
impl<TIM> Send for ErasedChannel<TIM>where
TIM: Send,
impl<TIM> Sync for ErasedChannel<TIM>where
TIM: Sync,
impl<TIM> Unpin for ErasedChannel<TIM>where
TIM: Unpin,
impl<TIM> UnwindSafe for ErasedChannel<TIM>where
TIM: UnwindSafe,
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