aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-rp/src/gpio.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs
index 93b29bbf9..a121a8036 100644
--- a/embassy-rp/src/gpio.rs
+++ b/embassy-rp/src/gpio.rs
@@ -889,6 +889,17 @@ pub struct AnyPin {
889 pin_bank: u8, 889 pin_bank: u8,
890} 890}
891 891
892impl AnyPin {
893 /// Unsafely create a new type-erased pin.
894 ///
895 /// # Safety
896 ///
897 /// You must ensure that you’re only using one instance of this type at a time.
898 pub unsafe fn steal(pin_bank: u8) -> Self {
899 Self { pin_bank }
900 }
901}
902
892impl_peripheral!(AnyPin); 903impl_peripheral!(AnyPin);
893 904
894impl Pin for AnyPin {} 905impl Pin for AnyPin {}