Skip to content

Faulty parameter check in 'hardware/pwm.h' #2076

@newbrain

Description

@newbrain

A minor fault in parameter checking for pwm_irqn_get_status_mask().

Line 764 of hardware/pwm.h reads:

invalid_params_if(HARDWARE_PWM, irq_index >= NUM_DMA_IRQS);

The check should be against NUM_PWM_IRQS (2 for RP2350, 1 for RP2040) instead of NUM_DMA_IRQS (4 for RP2350, 2 for RP2040), as all the other similar ones.

SDK version: 2.0.0
The issue is still present in main and develop branches as of today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions