add is_enabled() function
This commit is contained in:
parent
c26e62e4f4
commit
2809d3bd45
1 changed files with 7 additions and 0 deletions
|
@ -715,6 +715,13 @@ impl<'d, T: Instance> SimplePwm<'d, T> {
|
||||||
pwm
|
pwm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the enable state of the pwm counter
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn is_enabled(&self) -> bool {
|
||||||
|
let r = T::regs();
|
||||||
|
r.enable.read().enable().bit_is_set()
|
||||||
|
}
|
||||||
|
|
||||||
/// Enables the PWM generator.
|
/// Enables the PWM generator.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn enable(&self) {
|
pub fn enable(&self) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue