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 @@ -26,6 +26,7 @@ use core::arch::asm;
26
26
/// Internal function to implement a variable busy-wait loop.
27
27
/// # Arguments
28
28
/// * 'count' - an i32, the number of times to cycle the loop.
29
+ #[ inline( always) ]
29
30
pub fn delay ( count : u32 ) {
30
31
// Our asm busy-wait takes a 16 bit word as an argument,
31
32
// so the max number of loops is 2^16
@@ -52,6 +53,7 @@ pub fn delay(count: u32) {
52
53
///delay for N miliseconds
53
54
/// # Arguments
54
55
/// * 'ms' - an u32, number of milliseconds to busy-wait
56
+ #[ inline( always) ]
55
57
pub fn delay_ms ( ms : u32 ) {
56
58
// microseconds
57
59
let us = ms * 1000 ;
@@ -61,6 +63,7 @@ pub fn delay_ms(ms: u32) {
61
63
///delay for N microseconds
62
64
/// # Arguments
63
65
/// * 'ms' - an u32, number of microseconds to busy-wait
66
+ #[ inline( always) ]
64
67
pub fn delay_us ( us : u32 ) {
65
68
// picoseconds
66
69
let ps = us * 1000 ;
You can’t perform that action at this time.
0 commit comments