Skip to content

Audit timers HAL #3: Remove unwraps#532

Merged
RobertZ2011 merged 2 commits intoOpenDevicePartnership:mainfrom
kurtjd:audit-timers3
Dec 17, 2025
Merged

Audit timers HAL #3: Remove unwraps#532
RobertZ2011 merged 2 commits intoOpenDevicePartnership:mainfrom
kurtjd:audit-timers3

Conversation

@kurtjd
Copy link
Contributor

@kurtjd kurtjd commented Dec 17, 2025

Depends on #531
Resolves #530

This removes the last of the panic paths in the timers HAL by removing unwraps and changing a few constructors to return a Result instead (which introduces a breaking change). A new freq field was added to the PWM struct since originally, we unwrapped in a PWM trait method which does not return a Result. So, we just verify the clock config is valid in the constructor and can use the cached freq in the trait methods.

@kurtjd kurtjd self-assigned this Dec 17, 2025
@kurtjd kurtjd requested a review from a team as a code owner December 17, 2025 19:46
@kurtjd kurtjd added enhancement New feature or request BREAKING CHANGE PR causes a breaking change labels Dec 17, 2025
@kurtjd kurtjd requested a review from madeleyneVaca December 17, 2025 19:46
@kurtjd kurtjd moved this to In review in Embedded Controller Dec 17, 2025
Copy link
Contributor

@williampMSFT williampMSFT left a comment

Choose a reason for hiding this comment

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

:shipit:

@RobertZ2011 RobertZ2011 merged commit e5294fb into OpenDevicePartnership:main Dec 17, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Embedded Controller Dec 17, 2025
@kurtjd
Copy link
Contributor Author

kurtjd commented Dec 17, 2025

Breaking change announced on Zulip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING CHANGE PR causes a breaking change enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Audit timer

3 participants