mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-26 00:32:33 +00:00
add is_enabled() function
This commit is contained in:
parent
c26e62e4f4
commit
2809d3bd45
@ -715,6 +715,13 @@ impl<'d, T: Instance> SimplePwm<'d, T> {
|
||||
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.
|
||||
#[inline(always)]
|
||||
pub fn enable(&self) {
|
||||
|
Loading…
Reference in New Issue
Block a user