aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/tsc
diff options
context:
space:
mode:
authorJan Špaček <[email protected]>2024-05-24 22:04:04 +0200
committerJan Špaček <[email protected]>2024-05-25 18:44:55 +0200
commit081afca3f065dfd91e157d7c9a9477e2d914c99d (patch)
tree574b29636674d3e5a9e3763d00f709635856403e /embassy-stm32/src/tsc
parent01c1cb2764300625f80b24e70052f250de27d814 (diff)
stm32/rcc: replace generated enable/disable code with runtime info
Diffstat (limited to 'embassy-stm32/src/tsc')
-rw-r--r--embassy-stm32/src/tsc/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/tsc/mod.rs b/embassy-stm32/src/tsc/mod.rs
index bf583f04c..045d6317c 100644
--- a/embassy-stm32/src/tsc/mod.rs
+++ b/embassy-stm32/src/tsc/mod.rs
@@ -72,7 +72,7 @@ pub use enums::*;
72 72
73use crate::gpio::{AFType, AnyPin}; 73use crate::gpio::{AFType, AnyPin};
74use crate::pac::tsc::Tsc as Regs; 74use crate::pac::tsc::Tsc as Regs;
75use crate::rcc::RccPeripheral; 75use crate::rcc::{self, RccPeripheral};
76use crate::{peripherals, Peripheral}; 76use crate::{peripherals, Peripheral};
77 77
78#[cfg(tsc_v1)] 78#[cfg(tsc_v1)]
@@ -649,7 +649,7 @@ impl<'d, T: Instance> Tsc<'d, T> {
649 ) -> Self { 649 ) -> Self {
650 into_ref!(peri); 650 into_ref!(peri);
651 651
652 T::enable_and_reset(); 652 rcc::enable_and_reset::<T>();
653 653
654 T::REGS.cr().modify(|w| { 654 T::REGS.cr().modify(|w| {
655 w.set_tsce(true); 655 w.set_tsce(true);
@@ -880,7 +880,7 @@ impl<'d, T: Instance> Tsc<'d, T> {
880 880
881impl<'d, T: Instance> Drop for Tsc<'d, T> { 881impl<'d, T: Instance> Drop for Tsc<'d, T> {
882 fn drop(&mut self) { 882 fn drop(&mut self) {
883 T::disable(); 883 rcc::disable::<T>();
884 } 884 }
885} 885}
886 886