It appears that both implementations of is_low differ in output for the same logic level of the input pin:
use embedded_hal::digital::InputPin;
use rppal::gpio::{Gpio, InputPin as RppalInputPin};
fn main() {
let gpio = Gpio::new().unwrap();
let mut interrupt = gpio.get(6).unwrap().into_input();
println!(
"is low hal: {}, is low rppal: {}",
InputPin::is_low(&mut interrupt).unwrap(),
RppalInputPin::is_low(&interrupt)
);
}
With rppal v0.17.0 and embedded-hal v1.0.0 this code outputs: is low hal: false, is low rppal: true while with rppal v0.16.0 and embedded hal v1.0 rc2 this code outputs is low hal: true, is low rppal: true. During this test the raspi 4b pin was pulled low (0V)
I don't think the rppal v0.17.0 behavior is intended and this is likely a bug. Please let me know if there is some other reason for this change.
It appears that both implementations of
is_low
differ in output for the same logic level of the input pin:With rppal v0.17.0 and embedded-hal v1.0.0 this code outputs:
is low hal: false, is low rppal: true
while with rppal v0.16.0 and embedded hal v1.0 rc2 this code outputsis low hal: true, is low rppal: true
. During this test the raspi 4b pin was pulled low (0V)I don't think the rppal v0.17.0 behavior is intended and this is likely a bug. Please let me know if there is some other reason for this change.