Skip to content

Commit 0d42e31

Browse files
committed
Allow compilation even on non-AVR targets, for testing purposes
1 parent 15f4938 commit 0d42e31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ pub mod internal_delay_functions {
7373
/// # Arguments
7474
/// * 'count' - a u16, the number of times to cycle the loop.
7575
#[inline(always)]
76-
#[allow(unused_assignments)]
76+
#[allow(unused_variables, unused_mut, unused_assignments)]
7777
fn delay_loop_4_cycles(mut count: u16) {
78+
#[cfg(target_arch = "avr")]
7879
unsafe {
7980
llvm_asm!(
8081
"1: sbiw $0,1\n\tbrne 1b"
@@ -84,5 +85,6 @@ pub mod internal_delay_functions {
8485
: "volatile"
8586
);
8687
}
88+
// Allow compilation even on non-avr targets, for testing purposes
8789
}
8890
}

0 commit comments

Comments
 (0)