diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-03-20 13:49:19 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-03-20 13:49:19 +0100 |
| commit | a2fd4d751e1015905a6d8ce3a58db020cf45373d (patch) | |
| tree | ee46f5d5371f3fdce6fa4d714a70cb1c922a15dd /embassy-stm32/src/gpio.rs | |
| parent | 56e01d969f2066c4fe43fc459b25940c0d5ec69d (diff) | |
stm32/gpio: add missing eh02 InputPin for OutputOpenDrain.
Diffstat (limited to 'embassy-stm32/src/gpio.rs')
| -rw-r--r-- | embassy-stm32/src/gpio.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs index 00e3e1727..7cc28ff56 100644 --- a/embassy-stm32/src/gpio.rs +++ b/embassy-stm32/src/gpio.rs | |||
| @@ -833,6 +833,18 @@ impl<'d> embedded_hal_02::digital::v2::ToggleableOutputPin for Output<'d> { | |||
| 833 | } | 833 | } |
| 834 | } | 834 | } |
| 835 | 835 | ||
| 836 | impl<'d> embedded_hal_02::digital::v2::InputPin for OutputOpenDrain<'d> { | ||
| 837 | type Error = Infallible; | ||
| 838 | |||
| 839 | fn is_high(&self) -> Result<bool, Self::Error> { | ||
| 840 | Ok(self.is_high()) | ||
| 841 | } | ||
| 842 | |||
| 843 | fn is_low(&self) -> Result<bool, Self::Error> { | ||
| 844 | Ok(self.is_low()) | ||
| 845 | } | ||
| 846 | } | ||
| 847 | |||
| 836 | impl<'d> embedded_hal_02::digital::v2::OutputPin for OutputOpenDrain<'d> { | 848 | impl<'d> embedded_hal_02::digital::v2::OutputPin for OutputOpenDrain<'d> { |
| 837 | type Error = Infallible; | 849 | type Error = Infallible; |
| 838 | 850 | ||
