From 434ff38699eb07704ce019c3928948072ff291ad Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Thu, 21 Dec 2023 17:32:41 +0000 Subject: [PATCH] add missing ValidFunction implementation for DynFunction. This missing impl effectively prevented anyone from using a `Pin<_, DynFunction, _>`. --- rp2040-hal/src/gpio/func.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rp2040-hal/src/gpio/func.rs b/rp2040-hal/src/gpio/func.rs index 6eb32c188..4a774fffc 100644 --- a/rp2040-hal/src/gpio/func.rs +++ b/rp2040-hal/src/gpio/func.rs @@ -2,7 +2,7 @@ use core::marker::PhantomData; use paste::paste; -use super::pin::DynBankId; +use super::{pin::DynBankId, DynPinId}; pub(crate) mod func_sealed { use super::DynFunction; @@ -173,6 +173,7 @@ impl DynFunction { } } } +impl ValidFunction for P {} macro_rules! pin_valid_func { ($bank:ident as $prefix:ident, [$head:ident $(, $func:ident)*], [$($name:tt),+]) => { pin_valid_func!($bank as $prefix, [$($func),*], [$($name),+]);