Updates the DSU peripheral to use the `clock::v2` API
Summary
As part of the clock::v2 effort tracked in Issue #912, this PR updates the dsu to use the clock::v2 API by requiring ownership of its AhbClk and ApbClk. Note that this peripheral is only on thumbv7 targets.
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/nvm_dsu(usb::UsbBus)
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.
@kyp44 regarding the broken example, I believe this can be worked around as clock::V2 clocks have a .into() method to convert them into their V1 counterparts
@rnd-ash The conversion to the v1 types does not help here because usb::UsbBus::new requires a &mut Mclk, which is not possible to pass when using v2 because the Mclk is consumed by clock::v2::clock_system_at_reset to use the v2 API.
Ah right, in this case I personally was calling unsafe to steal mclk .... But you are right, it's probably best to avoid an unsafe block in our examples