File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 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;
2626/// Internal function to implement a variable busy-wait loop.
2727/// # Arguments
2828/// * 'count' - an i32, the number of times to cycle the loop.
29+ #[ inline( always) ]
2930pub fn delay ( count : u32 ) {
3031 // Our asm busy-wait takes a 16 bit word as an argument,
3132 // so the max number of loops is 2^16
@@ -52,6 +53,7 @@ pub fn delay(count: u32) {
5253///delay for N miliseconds
5354/// # Arguments
5455/// * 'ms' - an u32, number of milliseconds to busy-wait
56+ #[ inline( always) ]
5557pub fn delay_ms ( ms : u32 ) {
5658 // microseconds
5759 let us = ms * 1000 ;
@@ -61,6 +63,7 @@ pub fn delay_ms(ms: u32) {
6163///delay for N microseconds
6264/// # Arguments
6365/// * 'ms' - an u32, number of microseconds to busy-wait
66+ #[ inline( always) ]
6467pub fn delay_us ( us : u32 ) {
6568 // picoseconds
6669 let ps = us * 1000 ;
You can’t perform that action at this time.
0 commit comments