File tree 1 file changed +3
-0
lines changed 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 24
24
/// Internal function to implement a variable busy-wait loop.
25
25
/// # Arguments
26
26
/// * 'count' - an i32, the number of times to cycle the loop.
27
+ #[ inline( always) ]
27
28
pub fn delay ( count : u32 ) {
28
29
// Our asm busy-wait takes a 16 bit word as an argument,
29
30
// so the max number of loops is 2^16
@@ -49,6 +50,7 @@ pub fn delay(count: u32) {
49
50
///delay for N miliseconds
50
51
/// # Arguments
51
52
/// * 'ms' - an u32, number of milliseconds to busy-wait
53
+ #[ inline( always) ]
52
54
pub fn delay_ms ( ms : u32 ) {
53
55
// microseconds
54
56
let us = ms * 1000 ;
@@ -58,6 +60,7 @@ pub fn delay_ms(ms: u32) {
58
60
///delay for N microseconds
59
61
/// # Arguments
60
62
/// * 'ms' - an u32, number of microseconds to busy-wait
63
+ #[ inline( always) ]
61
64
pub fn delay_us ( us : u32 ) {
62
65
// picoseconds
63
66
let ps = us * 1000 ;
You can’t perform that action at this time.
0 commit comments