[−][src]Trait bl602_hal::prelude::_embedded_hal_PwmPin
A single PWM channel / pin
See Pwm
for details
Associated Types
type Error
Enumeration of PwmPin
errors
type Duty
Type for the duty
methods
The implementer is free to choose a float / percentage representation
(e.g. 0.0 .. 1.0
) or an integer representation (e.g. 0 .. 65535
)
Required methods
fn try_disable(&mut self) -> Result<(), Self::Error>
Disables a PWM channel
fn try_enable(&mut self) -> Result<(), Self::Error>
Enables a PWM channel
fn try_get_duty(&self) -> Result<Self::Duty, Self::Error>
Returns the current duty cycle
While the pin is transitioning to the new duty cycle after a try_set_duty
call, this may
return the old or the new duty cycle depending on the implementation.
fn try_get_max_duty(&self) -> Result<Self::Duty, Self::Error>
Returns the maximum duty cycle value
fn try_set_duty(&mut self, duty: Self::Duty) -> Result<(), Self::Error>
Sets a new duty cycle