stm32/pwm: allow using the advanced timer instances too.

This commit is contained in:
Dario Nieuwenhuis 2021-11-27 03:06:53 +01:00
parent e40555e245
commit 006e567716
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
"rust-analyzer.checkOnSave.allTargets": false, "rust-analyzer.checkOnSave.allTargets": false,
"rust-analyzer.checkOnSave.command": "clippy", "rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.cargo.noDefaultFeatures": true, "rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.experimental.procAttrMacros": false,
"rust-analyzer.checkOnSave.noDefaultFeatures": true, "rust-analyzer.checkOnSave.noDefaultFeatures": true,
"rust-analyzer.cargo.target": "thumbv7em-none-eabi", "rust-analyzer.cargo.target": "thumbv7em-none-eabi",
"rust-analyzer.cargo.features": [ "rust-analyzer.cargo.features": [

View File

@ -142,7 +142,7 @@ macro_rules! impl_timer {
($inst:ident) => { ($inst:ident) => {
impl crate::pwm::sealed::Instance for crate::peripherals::$inst { impl crate::pwm::sealed::Instance for crate::peripherals::$inst {
fn regs() -> crate::pac::timer::TimGp16 { fn regs() -> crate::pac::timer::TimGp16 {
crate::pac::$inst crate::pac::timer::TimGp16(crate::pac::$inst.0)
} }
} }