diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs index 03354abf8..856e12024 100644 --- a/embassy-nrf/src/pwm.rs +++ b/embassy-nrf/src/pwm.rs @@ -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) {