Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a superfluous trait bound that broke non-totem-pole devices #35

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/pin.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::marker::PhantomData;
use embedded_hal::digital::{self as hal_digital, ErrorType};
use embedded_hal::digital::{self as hal_digital};

/// Representation of a port-expander pin.
///
Expand Down Expand Up @@ -71,9 +71,9 @@ impl<PDE> From<PDE> for PinError<PDE> {
}
}

impl<'a, MODE, MUTEX, PD> ErrorType for Pin<'a, MODE, MUTEX>
impl<'a, MODE, MUTEX, PD> hal_digital::ErrorType for Pin<'a, MODE, MUTEX>
where
PD: crate::PortDriver + crate::PortDriverTotemPole,
PD: crate::PortDriver,
PD::Error: core::fmt::Debug,
MUTEX: crate::PortMutex<Port = PD>,
{
Expand Down Expand Up @@ -199,7 +199,7 @@ where

impl<'a, MODE: crate::mode::HasInput, MUTEX, PD> hal_digital::InputPin for Pin<'a, MODE, MUTEX>
where
PD: crate::PortDriver + crate::PortDriverTotemPole,
PD: crate::PortDriver,
<PD as crate::PortDriver>::Error: core::fmt::Debug,
MUTEX: crate::PortMutex<Port = PD>,
{
Expand Down Expand Up @@ -258,7 +258,7 @@ where

impl<'a, MODE: crate::mode::HasOutput, MUTEX, PD> hal_digital::OutputPin for Pin<'a, MODE, MUTEX>
where
PD: crate::PortDriver + crate::PortDriverTotemPole,
PD: crate::PortDriver,
<PD as crate::PortDriver>::Error: core::fmt::Debug,
MUTEX: crate::PortMutex<Port = PD>,
{
Expand All @@ -274,7 +274,7 @@ where
impl<'a, MODE: crate::mode::HasOutput, MUTEX, PD> hal_digital::StatefulOutputPin
for Pin<'a, MODE, MUTEX>
where
PD: crate::PortDriver + crate::PortDriverTotemPole,
PD: crate::PortDriver,
<PD as crate::PortDriver>::Error: core::fmt::Debug,
MUTEX: crate::PortMutex<Port = PD>,
{
Expand Down