Implement Output::is_set_low for embassy-rp
This commit implements a suggestion for the method is_set_low which is currently a 'todo', by reading last value written to GPIO_OUT.
This commit is contained in:
parent
69e0f9f0fe
commit
6d4a49bca8
@ -127,8 +127,8 @@ impl<'d, T: Pin> Output<'d, T> {
|
|||||||
|
|
||||||
/// Is the output pin set as low?
|
/// Is the output pin set as low?
|
||||||
pub fn is_set_low(&self) -> bool {
|
pub fn is_set_low(&self) -> bool {
|
||||||
// todo
|
// Reading from SIO: GPIO_OUT gives the last value written.
|
||||||
true
|
unsafe { self.pin.sio_out().value().read() == 0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user