Skip to content

Conversation

kyp44
Copy link
Contributor

@kyp44 kyp44 commented Aug 8, 2025

Summary

As part of the clock::v2 effort tracked in Issue #912, this PR updates the dmac to use the clock::v2 API by requiring ownership of its AhbClk for thumbv7 targets.

See the commit message for details.

The following Tier 1 BSP examples were also updated to include the change:

  • samd11_bare/i2c
  • feather_m0/async_dmac
  • feather_m0/async_i2c
  • feather_m0/async_spi
  • feather_m0/async_uart
  • feather_m0/dmac
  • feather_m0/i2c
  • feather_m0/spi
  • feather_m0/uart_dma_blocking
  • feather_m0/uart_dma_nonblocking
  • feather_m4/dmac
  • metro_m0/i2c
  • metro_m0/spi
  • metro_m4/async_dmac

The following Tier 1 BSP examples are now broken and cannot be fixed until the noted peripherals are also migrated and merged (see the notes about this in Issue #912):

  • feather_m4/i2c (sercom::i2c::Config)
  • feather_m4/spi (sercom::spi::Config)
  • feather_m4/uart_dma_blocking (sercom::uart::Config)
  • feather_m4/uart_dma_nonblocking (sercom::uart::Config)
  • metro_m4/async_i2c (sercom::i2c::Config)
  • metro_m4/async_spi (sercom::spi::Config)
  • metro_m4/async_uart (sercom::uart::Config)
  • metro_m4/i2c (sercom::i2c::Config)
  • metro_m4/spi (sercom::spi::Config)

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.

kyp44 added 2 commits August 13, 2025 13:48
… API for `thumbv7` targets.

* Renames the `dmac::DmacController::init` to `dmac::DmacController::new` for all targets for consistency with other peripherals
* `dmac::DmacController::new` now requires the `AhbClk<Dmac>` for `thumbv7` targets instead of `&mut Pm`.
* `dmac::DmacController::free` also now returns the `AhbClk<Dmac>` for `thumbv7` targets.
* Addresses some other `cargo doc` warnings in the `dmac` module.
… API for `thumbv7` targets.

* Updates the examples in the `dmac` module documentation to reflect the API changes.
* Updates all applicable Tier 1 BSP examples, while others are broken, requiring additional peripheral migrations before they can be fixed.
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.

1 participant