File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,11 @@ pub struct Delay<T = SYST> {
12
12
clocks : Clocks ,
13
13
}
14
14
15
+ impl < T > Delay < T > {
16
+ /// Releases the timer resource
17
+ pub fn release ( self ) -> T {
18
+ self . tim
19
+ }
20
+ }
21
+
15
22
mod timer;
Original file line number Diff line number Diff line change @@ -20,11 +20,6 @@ impl Delay<SYST> {
20
20
pub fn free ( self ) -> SYST {
21
21
self . release ( )
22
22
}
23
-
24
- /// Releases the system timer (SysTick) resource
25
- pub fn release ( self ) -> SYST {
26
- self . tim
27
- }
28
23
}
29
24
30
25
impl DelayMs < u32 > for Delay < SYST > {
Original file line number Diff line number Diff line change @@ -58,11 +58,6 @@ macro_rules! hal {
58
58
59
59
Self { tim, clocks }
60
60
}
61
-
62
- /// Releases the timer resource
63
- pub fn free( self ) -> $TIM {
64
- self . tim
65
- }
66
61
}
67
62
68
63
impl DelayUs <u32 > for Delay <$TIM> {
You can’t perform that action at this time.
0 commit comments