From 006e567716362acfde90afcfd8a25be1fe0d6897 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Sat, 27 Nov 2021 03:06:53 +0100 Subject: [PATCH] stm32/pwm: allow using the advanced timer instances too. --- .vscode/settings.json | 1 + embassy-stm32/src/pwm/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0e67ab82..87dd158e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,6 +6,7 @@ "rust-analyzer.checkOnSave.allTargets": false, "rust-analyzer.checkOnSave.command": "clippy", "rust-analyzer.cargo.noDefaultFeatures": true, + "rust-analyzer.experimental.procAttrMacros": false, "rust-analyzer.checkOnSave.noDefaultFeatures": true, "rust-analyzer.cargo.target": "thumbv7em-none-eabi", "rust-analyzer.cargo.features": [ diff --git a/embassy-stm32/src/pwm/mod.rs b/embassy-stm32/src/pwm/mod.rs index 7176603e..8357b6cd 100644 --- a/embassy-stm32/src/pwm/mod.rs +++ b/embassy-stm32/src/pwm/mod.rs @@ -142,7 +142,7 @@ macro_rules! impl_timer { ($inst:ident) => { impl crate::pwm::sealed::Instance for crate::peripherals::$inst { fn regs() -> crate::pac::timer::TimGp16 { - crate::pac::$inst + crate::pac::timer::TimGp16(crate::pac::$inst.0) } }