pub struct PwmChannel<TIM, const C: u8> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<TIM: Instance + WithPwm, const C: u8> ErrorType for PwmChannel<TIM, C>
impl<TIM: Instance + WithPwm, const C: u8> ErrorType for PwmChannel<TIM, C>
Source§type Error = Infallible
type Error = Infallible
Error type
Source§impl<TIM: Instance + WithPwm, const C: u8> PwmPin for PwmChannel<TIM, C>
impl<TIM: Instance + WithPwm, const C: u8> PwmPin for PwmChannel<TIM, C>
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, const C: u8> SetDutyCycle for PwmChannel<TIM, C>
impl<TIM: Instance + WithPwm, const C: u8> SetDutyCycle for PwmChannel<TIM, C>
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, const C: u8> Freeze for PwmChannel<TIM, C>
impl<TIM, const C: u8> RefUnwindSafe for PwmChannel<TIM, C>where
TIM: RefUnwindSafe,
impl<TIM, const C: u8> Send for PwmChannel<TIM, C>where
TIM: Send,
impl<TIM, const C: u8> Sync for PwmChannel<TIM, C>where
TIM: Sync,
impl<TIM, const C: u8> Unpin for PwmChannel<TIM, C>where
TIM: Unpin,
impl<TIM, const C: u8> UnwindSafe for PwmChannel<TIM, C>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