Trait embedded_hal::pwm::blocking::PwmPin [−][src]
pub trait PwmPin {
type Error: Debug;
type Duty;
fn disable(&mut self) -> Result<(), Self::Error>;
fn enable(&mut self) -> Result<(), Self::Error>;
fn get_duty(&self) -> Result<Self::Duty, Self::Error>;
fn get_max_duty(&self) -> Result<Self::Duty, Self::Error>;
fn set_duty(&mut self, duty: Self::Duty) -> Result<(), Self::Error>;
}
Expand description
A single PWM channel / pin
See Pwm
for details
Associated Types
Required methods
Returns the current duty cycle
While the pin is transitioning to the new duty cycle after a set_duty
call, this may
return the old or the new duty cycle depending on the implementation.
fn get_max_duty(&self) -> Result<Self::Duty, Self::Error>
fn get_max_duty(&self) -> Result<Self::Duty, Self::Error>
Returns the maximum duty cycle value