Updates the DMAC peripheral to use the `clock::v2` API
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/i2cfeather_m0/async_dmacfeather_m0/async_i2cfeather_m0/async_spifeather_m0/async_uartfeather_m0/dmacfeather_m0/i2cfeather_m0/spifeather_m0/uart_dma_blockingfeather_m0/uart_dma_nonblockingfeather_m4/dmacmetro_m0/i2cmetro_m0/spimetro_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
- [X] All new or modified code is well documented, especially public items
- [X] 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.
Apart from the discussion question, I'm happy for this to be merged into our Clock V2 branch, then we can fix the examples once the other peripherals are migrated
A merge is good with me. I don't think we need to track the broken examples in the branch as we go. I have a script to go build all the Tier 1 BSPs so they will be easy to assess the broken examples at any point, plus we can refer back to the PRs to know when requisite peripherals have been merged.
Exactly! The examples will be fixed as we go :)