[−][src]Struct imxrt_hal::pwm::Controller
A PWM controller, which implements
The Controller
enables you to set PWM duty cycles and switching periods.
It requires mutable access to both the PWM handle and the PWM pins that you
want to control. Once you've set your values, drop the controller. Pair the
handle with another Pair
to set those values.
Trait Implementations
impl<'a, A, B, D> Pwm for Controller<'a, A, B, D, _0> where
A: Pin<Output = A, Submodule = _0>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
[src]
A: Pin<Output = A, Submodule = _0>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
type Channel = Channel
Enumeration of channels that can be used with this Pwm
interface Read more
type Time = Duration
A time unit that can be converted into a human time unit (e.g. seconds)
type Duty = u16
Type for the duty
methods Read more
fn disable(&mut self, channel: Self::Channel)
[src]
fn enable(&mut self, channel: Self::Channel)
[src]
fn get_duty(&self, channel: Self::Channel) -> Self::Duty
[src]
fn get_period(&self) -> Self::Time
[src]
fn get_max_duty(&self) -> Self::Duty
[src]
fn set_duty(&mut self, channel: Self::Channel, duty: Self::Duty)
[src]
fn set_period<P: Into<Self::Time>>(&mut self, period: P)
[src]
impl<'a, A, B, D> Pwm for Controller<'a, A, B, D, _1> where
A: Pin<Output = A, Submodule = _1>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
[src]
A: Pin<Output = A, Submodule = _1>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
type Channel = Channel
Enumeration of channels that can be used with this Pwm
interface Read more
type Time = Duration
A time unit that can be converted into a human time unit (e.g. seconds)
type Duty = u16
Type for the duty
methods Read more
fn disable(&mut self, channel: Self::Channel)
[src]
fn enable(&mut self, channel: Self::Channel)
[src]
fn get_duty(&self, channel: Self::Channel) -> Self::Duty
[src]
fn get_period(&self) -> Self::Time
[src]
fn get_max_duty(&self) -> Self::Duty
[src]
fn set_duty(&mut self, channel: Self::Channel, duty: Self::Duty)
[src]
fn set_period<P: Into<Self::Time>>(&mut self, period: P)
[src]
impl<'a, A, B, D> Pwm for Controller<'a, A, B, D, _2> where
A: Pin<Output = A, Submodule = _2>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
[src]
A: Pin<Output = A, Submodule = _2>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
type Channel = Channel
Enumeration of channels that can be used with this Pwm
interface Read more
type Time = Duration
A time unit that can be converted into a human time unit (e.g. seconds)
type Duty = u16
Type for the duty
methods Read more
fn disable(&mut self, channel: Self::Channel)
[src]
fn enable(&mut self, channel: Self::Channel)
[src]
fn get_duty(&self, channel: Self::Channel) -> Self::Duty
[src]
fn get_period(&self) -> Self::Time
[src]
fn get_max_duty(&self) -> Self::Duty
[src]
fn set_duty(&mut self, channel: Self::Channel, duty: Self::Duty)
[src]
fn set_period<P: Into<Self::Time>>(&mut self, period: P)
[src]
impl<'a, A, B, D> Pwm for Controller<'a, A, B, D, _3> where
A: Pin<Output = A, Submodule = _3>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
[src]
A: Pin<Output = A, Submodule = _3>,
B: Pin<Output = B, Module = <A as Pin>::Module, Submodule = <A as Pin>::Submodule>,
D: 'a + DerefMut<Target = Handle<<A as Pin>::Module>>,
type Channel = Channel
Enumeration of channels that can be used with this Pwm
interface Read more
type Time = Duration
A time unit that can be converted into a human time unit (e.g. seconds)
type Duty = u16
Type for the duty
methods Read more
fn disable(&mut self, channel: Self::Channel)
[src]
fn enable(&mut self, channel: Self::Channel)
[src]
fn get_duty(&self, channel: Self::Channel) -> Self::Duty
[src]
fn get_period(&self) -> Self::Time
[src]
fn get_max_duty(&self) -> Self::Duty
[src]
fn set_duty(&mut self, channel: Self::Channel, duty: Self::Duty)
[src]
fn set_period<P: Into<Self::Time>>(&mut self, period: P)
[src]
Auto Trait Implementations
impl<'a, A, B, D, S> Send for Controller<'a, A, B, D, S> where
A: Send,
B: Send,
D: Send,
S: Send,
A: Send,
B: Send,
D: Send,
S: Send,
impl<'a, A, B, D, S> Sync for Controller<'a, A, B, D, S> where
A: Sync,
B: Sync,
D: Sync,
S: Sync,
A: Sync,
B: Sync,
D: Sync,
S: Sync,
impl<'a, A, B, D, S> Unpin for Controller<'a, A, B, D, S> where
D: Unpin,
S: Unpin,
D: Unpin,
S: Unpin,
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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,