Skip to content

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

Merged
rnd-ash merged 2 commits into
atsamd-rs:feat/clock-v2from
kyp44:icm-clock-v2
Jun 1, 2026
Merged

Updates the ICM peripheral to use the clock::v2 API#927
rnd-ash merged 2 commits into
atsamd-rs:feat/clock-v2from
kyp44:icm-clock-v2

Conversation

@kyp44

@kyp44 kyp44 commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

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

rnd-ash commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

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

@ianrrees ianrrees left a comment

Copy link
Copy Markdown
Contributor

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

kyp44 commented Jul 22, 2025

Copy link
Copy Markdown
Contributor Author

@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.
@rnd-ash
rnd-ash merged commit 2b047d8 into atsamd-rs:feat/clock-v2 Jun 1, 2026
107 checks passed
jbeaurivage pushed a commit that referenced this pull request Jun 2, 2026
* feat(icm): Migrates the `icm::Icm` peripheral to use the `clock::v2`.
    * `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.

* feat(icm): Removes the underscores from the owned AHB and APB clocks in the `Icm` struct per the recommendation in PR #927.
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