Struct imxrt_hal::pwm::PWM [−][src]
pub struct PWM<M> {
pub handle: Handle<M>,
pub sm0: Submodule<M, U0>,
pub sm1: Submodule<M, U1>,
pub sm2: Submodule<M, U2>,
pub sm3: Submodule<M, U3>,
}
Expand description
A PWM peripheral
The PWM peripheral is broken into
- the PWM master handle,
handle
, - four submodules, numbered
0
through3
.
The submodules are taken when you want to turn pins into PWM outputs. The handle provides access to registers that are shared across PWM submodules.
Fields
handle: Handle<M>
The peripheral handle
Methods that need access to peripheral-level registers, rather than just submodule-level registers, must have a mutable reference to the handle.
sm0: Submodule<M, U0>
Submodule 0
sm1: Submodule<M, U1>
Submodule 1
sm2: Submodule<M, U2>
Submodule 2
sm3: Submodule<M, U3>
Submodule 3