Skip to content

Commit

Permalink
Accept any pin in AnyPin
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Sep 4, 2024
1 parent 0892077 commit a6113f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions esp-hal/src/gpio/any_pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl<'d> AnyPin<'d> {
#[inline]
pub fn new<P>(pin: impl crate::peripheral::Peripheral<P = P> + 'd) -> Self
where
P: OutputPin + InputPin,
P: Pin,
{
crate::into_ref!(pin);
let pin = pin.degrade_internal(private::Internal);
Expand All @@ -44,7 +44,7 @@ impl<'d> AnyPin<'d> {
#[inline]
pub fn new_inverted<P>(pin: impl crate::peripheral::Peripheral<P = P> + 'd) -> Self
where
P: OutputPin + InputPin,
P: Pin,
{
crate::into_ref!(pin);
let pin = pin.degrade_internal(private::Internal);
Expand Down Expand Up @@ -214,7 +214,7 @@ impl<'d> AnyInputOnlyPin<'d> {
#[inline]
pub fn new<P>(pin: impl crate::peripheral::Peripheral<P = P> + 'd) -> Self
where
P: InputPin + GpioProperties,
P: InputPin,
{
crate::into_ref!(pin);
let pin = pin.degrade_pin(private::Internal);
Expand Down

0 comments on commit a6113f4

Please sign in to comment.