File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 12
12
/// `UXX` denotes the range type of the delay time. `UXX` can be `u8`, `u16`, etc. A single type can
13
13
/// implement this trait for different types of `UXX`.
14
14
pub trait DelayMs < UXX > {
15
+ /// Enumeration of `DelayMs` errors
16
+ type Error ;
17
+
15
18
/// Pauses execution for `ms` milliseconds
16
- fn delay_ms ( & mut self , ms : UXX ) ;
19
+ fn try_delay_ms ( & mut self , ms : UXX ) -> Result < ( ) , Self :: Error > ;
17
20
}
18
21
19
22
/// Microsecond delay
20
23
///
21
24
/// `UXX` denotes the range type of the delay time. `UXX` can be `u8`, `u16`, etc. A single type can
22
25
/// implement this trait for different types of `UXX`.
23
26
pub trait DelayUs < UXX > {
27
+ /// Enumeration of `DelayMs` errors
28
+ type Error ;
29
+
24
30
/// Pauses execution for `us` microseconds
25
- fn delay_us ( & mut self , us : UXX ) ;
31
+ fn try_delay_us ( & mut self , us : UXX ) -> Result < ( ) , Self :: Error > ;
26
32
}
You can’t perform that action at this time.
0 commit comments