diff --git a/libautobar/src/lib.rs b/libautobar/src/lib.rs index 976c226..8c2cdc5 100644 --- a/libautobar/src/lib.rs +++ b/libautobar/src/lib.rs @@ -14,9 +14,11 @@ extern { #[no_mangle] pub extern "C" fn set_and_sleep(pin: i32, status: bool, time: i32) -> () { - unsafe { - gpio_put_explict(pin, status); - sleep_ms(time); + if pin <= 28 { + unsafe { + gpio_put_explict(pin, status); + sleep_ms(time); + } } }