Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/rp2_common/hardware_pwm/include/hardware/pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

@sprickett sprickett Jun 29, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or Get PWM enabled slice 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
Expand Down