Skip to content

Updates the ICM peripheral to use the clock::v2 API#927

Open
kyp44 wants to merge 2 commits intoatsamd-rs:feat/clock-v2from
kyp44:icm-clock-v2
Open

Updates the ICM peripheral to use the clock::v2 API#927
kyp44 wants to merge 2 commits intoatsamd-rs:feat/clock-v2from
kyp44:icm-clock-v2

Conversation

@kyp44
Copy link
Copy Markdown
Contributor

@kyp44 kyp44 commented Jul 19, 2025

Summary

As part of the clock::v2 effort tracked in Issue #912, this PR updates the icm to use the clock::v2 API by requiring ownership of its AhbClk and ApbClk. Note that this peripheral is only on thumbv7 targets.

No examples on any Tier 1 BSPs use the ICM so none were affected.

Checklist

  • All new or modified code is well documented, especially public items
  • No new warnings or clippy suggestions have been introduced - CI will deny clippy warnings by default! You may #[allow] certain lints where reasonable, but ideally justify those with a short comment.

@rnd-ash
Copy link
Copy Markdown
Contributor

rnd-ash commented Jul 19, 2025

Looks good to me! Appreciate the documentation updates as well.

Copy link
Copy Markdown
Contributor

@ianrrees ianrrees left a comment

Choose a reason for hiding this comment

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

Just a minor naming suggestion, but otherwise LGTM

Comment thread hal/src/peripherals/icm.rs Outdated
Comment thread hal/src/peripherals/icm.rs Outdated
kyp44 added a commit to kyp44/atsamd that referenced this pull request Jul 21, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Jul 21, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Jul 21, 2025
@kyp44
Copy link
Copy Markdown
Contributor Author

kyp44 commented Jul 22, 2025

@ianrrees Removed the underscores in the latest commit, and also did so in PR #925 for the same reason.

kyp44 added a commit to kyp44/atsamd that referenced this pull request Jul 30, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Aug 4, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Aug 13, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Aug 13, 2025
sajattack pushed a commit to kyp44/atsamd that referenced this pull request Sep 30, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Oct 1, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Oct 15, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Oct 15, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Oct 29, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Oct 29, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Nov 12, 2025
kyp44 added a commit to kyp44/atsamd that referenced this pull request Nov 12, 2025
@kyp44 kyp44 changed the base branch from master to feat/clock-v2 November 12, 2025 14:57
kyp44 added a commit to kyp44/atsamd that referenced this pull request Nov 24, 2025
    * `Icm::new` now requires ownership of its `AhbClk` and `ApbClk`.
    * Renames `Icm::destroy` to the standard `Icm::free` method to free the `pac::Icm` and bus clocks.
    * Updates the `icm` module documentation example to include the above changes.
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.

3 participants