You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: embedded-hal-bus/src/spi/mod.rs
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,25 @@ where
39
39
/// Dummy `DelayUs` implementation that panics on use.
40
40
pubstructNoDelay;
41
41
42
+
#[cold]
43
+
fnno_delay_panic(){
44
+
panic!("You've tried to execute a SPI transaction containing a `Operation::Delay` in a `SpiDevice` created with `new_no_delay()`. Create it with `new()` instead, passing a `DelayUs` implementation.");
45
+
}
46
+
42
47
impl embedded_hal::delay::DelayUsforNoDelay{
43
48
fndelay_us(&mutself,_us:u32){
44
-
panic!("You've tried to execute a SPI transaction containing a `Operation::Delay` in a `SpiDevice` created with `new_no_delay()`. Create it with `new()` instead, passing a `DelayUs` implementation.")
0 commit comments