Enum rev_11_1105_rs::Pattern [−][src]
Expression of each valid driver colour mode as a value from 0..200
.
Values are expressed in this range so they can be converted back to their
float form when used (since enums can not store f32
types in a useful way)
These values are not intended to be passes directly to a PWM output, but to be converted to the correct duty cycle format before use
These values are transcribed from the user manual
Variants
Implementations
impl Pattern
[src]
pub fn as_percentage(&self) -> f32
[src]
Get the pattern duty cycle as a percentage value from -1.0
to 1.0
pub fn as_abs_percentage(&self) -> f32
[src]
Get the pattern duty cycle as a percentage value from 0.0
to 1.0
pub fn as_duty<T: Num + NumCast + PartialOrd + Copy>(&self, max_duty: T) -> T
[src]
Get the pattern duty cycle as a value from 0
to max_duty
.
The max_duty
should be the output of embedded_hal::PwmPin::get_max_duty()
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,