added pin condition

This commit is contained in:
Wyatt J. Miller 2022-07-16 19:12:24 -04:00
parent 57f63e04a2
commit be564fe181

View File

@ -14,11 +14,13 @@ extern {
#[no_mangle]
pub extern "C" fn set_and_sleep(pin: i32, status: bool, time: i32) -> () {
if pin <= 28 {
unsafe {
gpio_put_explict(pin, status);
sleep_ms(time);
}
}
}
// this is just a mock test, supposed to pass
#[cfg(test)]