Skip to content

Conversation

@nzkurtz
Copy link

@nzkurtz nzkurtz commented Nov 19, 2025

Fix incorrect range check for BBLED PWM IDs.

The original condition:

id >= MCHP_PWM_ID_MAX && id < MCHP_PWM_ID_MAX

can never be true. Updated the check to:

id >= MCHP_PWM_ID_MAX &&
id < (MCHP_PWM_ID_MAX + MCHP_BBLEN_INSTANCES)

This correctly validates BBLED instances and aligns with the size of pwm_slp_bitpos[].

Fixes #31

@github-actions
Copy link

github-actions bot commented Nov 19, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@nzkurtz nzkurtz force-pushed the fix-bbled-sleep-mask branch from b794c7f to a8e75ba Compare November 19, 2025 07:50
@nzkurtz
Copy link
Author

nzkurtz commented Nov 19, 2025

recheck

@nzkurtz
Copy link
Author

nzkurtz commented Nov 19, 2025

I have read the CLA Document and I hereby sign the CLA

@nzkurtz
Copy link
Author

nzkurtz commented Nov 19, 2025

recheck

kiram9 added a commit that referenced this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pwm: Condition of if statement never holds

1 participant