We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15f4938 commit 0d42e31Copy full SHA for 0d42e31
src/lib.rs
@@ -73,8 +73,9 @@ pub mod internal_delay_functions {
73
/// # Arguments
74
/// * 'count' - a u16, the number of times to cycle the loop.
75
#[inline(always)]
76
- #[allow(unused_assignments)]
+ #[allow(unused_variables, unused_mut, unused_assignments)]
77
fn delay_loop_4_cycles(mut count: u16) {
78
+ #[cfg(target_arch = "avr")]
79
unsafe {
80
llvm_asm!(
81
"1: sbiw $0,1\n\tbrne 1b"
@@ -84,5 +85,6 @@ pub mod internal_delay_functions {
84
85
: "volatile"
86
);
87
}
88
+ // Allow compilation even on non-avr targets, for testing purposes
89
90
0 commit comments