We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ce09e0 commit c72d569Copy full SHA for c72d569
src/gpio.rs
@@ -118,6 +118,10 @@ impl AnyPin {
118
_p: PhantomData,
119
}
120
121
+ /// Gets the pin number.
122
+ pub fn get_pin(&self) -> i32 {
123
+ self.pin
124
+ }
125
/// Gets a set of the types of pins this pin can be cast to
126
pub fn types(&self) -> PinTypes {
127
self.pin_types
@@ -2000,10 +2004,10 @@ macro_rules! define_all_pins {
2000
2004
$name: $ty::new(),
2001
2005
)*}
2002
2006
2003
- pub fn into_dynamic(self) -> [(u8, AnyPin); NUM_PINS] {
2007
+ pub fn into_dynamic(self) -> [AnyPin; NUM_PINS] {
2008
[$(
2009
$(#[cfg($cond)])?
- ($id, self.$name.into()),
2010
+ self.$name.into(),
2011
)*]
2012
2013
0 commit comments