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

Closed
opened 2024-11-20 17:10:14 -06:00 by newbrain · 1 comment
newbrain commented 2024-11-20 17:10:14 -06:00 (Migrated from github.com)

A minor fault in parameter checking for pwm_irqn_get_status_mask().

Line 764 of hardware/pwm.h reads:
github.com/raspberrypi/pico-sdk@efe2103f9b/src/rp2_common/hardware_pwm/include/hardware/pwm.h (L764)

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.

A minor fault in parameter checking for `pwm_irqn_get_status_mask()`. Line 764 of `hardware/pwm.h` reads: https://github.com/raspberrypi/pico-sdk/blob/efe2103f9b28458a1615ff096054479743ade236/src/rp2_common/hardware_pwm/include/hardware/pwm.h#L764 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.
kilograham commented 2024-11-20 18:06:11 -06:00 (Migrated from github.com)

merged into develop

merged into develop
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#2076
No description provided.