We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6247dc commit 7e4eb98Copy full SHA for 7e4eb98
src/gpio.rs
@@ -127,6 +127,9 @@ macro_rules! gpio {
127
}
128
129
impl<MODE> $PXx<MODE> {
130
+ /// The port this pin is part of.
131
+ pub const PORT: Port = Port::$PXx;
132
+
133
/// Returns the port this pin is part of.
134
pub fn port(&self) -> Port {
135
Port::$PXx
@@ -206,6 +209,12 @@ macro_rules! gpio {
206
209
207
210
208
211
impl<MODE> $PXi<MODE> {
212
213
214
215
+ /// The pin's number inside its port.
216
+ pub const PIN_NUMBER: u8 = $i;
217
218
219
220
0 commit comments