aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/timer/low_level.rs
diff options
context:
space:
mode:
authorGrant Miller <[email protected]>2024-09-07 11:13:18 -0500
committerGrant Miller <[email protected]>2024-09-07 11:17:13 -0500
commitdf06c2bbfe51e22e0d3eda3d760839f617ffbd96 (patch)
tree9650a486f89c43e994971b4845edc3ba34fcce01 /embassy-stm32/src/timer/low_level.rs
parentb8beaba6df08c4455f55780a6e13191d95ad9eec (diff)
wip: split by value
Diffstat (limited to 'embassy-stm32/src/timer/low_level.rs')
-rw-r--r--embassy-stm32/src/timer/low_level.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/embassy-stm32/src/timer/low_level.rs b/embassy-stm32/src/timer/low_level.rs
index e643722aa..6377054c5 100644
--- a/embassy-stm32/src/timer/low_level.rs
+++ b/embassy-stm32/src/timer/low_level.rs
@@ -6,6 +6,8 @@
6//! 6//!
7//! The available functionality depends on the timer type. 7//! The available functionality depends on the timer type.
8 8
9use core::mem::ManuallyDrop;
10
9use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef}; 11use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef};
10// Re-export useful enums 12// Re-export useful enums
11pub use stm32_metapac::timer::vals::{FilterValue, Sms as SlaveMode, Ts as TriggerSource}; 13pub use stm32_metapac::timer::vals::{FilterValue, Sms as SlaveMode, Ts as TriggerSource};
@@ -198,6 +200,13 @@ impl<'d, T: CoreInstance> Timer<'d, T> {
198 Self { tim } 200 Self { tim }
199 } 201 }
200 202
203 pub(crate) unsafe fn clone_unchecked(&self) -> ManuallyDrop<Self> {
204 // this doesn't work for some reason
205 // let tim = unsafe { self.tim.clone_unchecked() };
206 let tim = todo!();
207 ManuallyDrop::new(Self { tim })
208 }
209
201 /// Get access to the virutal core 16bit timer registers. 210 /// Get access to the virutal core 16bit timer registers.
202 /// 211 ///
203 /// Note: This works even if the timer is more capable, because registers 212 /// Note: This works even if the timer is more capable, because registers