diff --git a/src/rp2_common/hardware_pwm/include/hardware/pwm.h b/src/rp2_common/hardware_pwm/include/hardware/pwm.h index 4e111ec89..42eed1f52 100644 --- a/src/rp2_common/hardware_pwm/include/hardware/pwm.h +++ b/src/rp2_common/hardware_pwm/include/hardware/pwm.h @@ -557,12 +557,21 @@ static inline void pwm_set_enabled(uint slice_num, bool enabled) { /** \brief Enable/Disable multiple PWM slices simultaneously * \ingroup hardware_pwm * - * \param mask Bitmap of PWMs to enable/disable. Bits 0 to 7 enable slices 0-7 respectively + * \param mask Bitmask of PWMs to enable/disable. Bits 0 to 7 enable slices 0-7 respectively */ static inline void pwm_set_mask_enabled(uint32_t mask) { pwm_hw->en = mask; } +/** \brief Get PWM slice enabled status + * \ingroup hardware_pwm + * + * \return Bitmask of all PWM slices currently enabled + */ +static inline uint32_t pwm_get_mask_enabled(void) { + return pwm_hw->en; +} + /** * \def PWM_DEFAULT_IRQ_NUM() * \ingroup hardware_pwm