Skip to content

Commit 8b72915

Browse files
Derive a few useful traits on common GPIO types
1 parent 97d5d92 commit 8b72915

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gpio.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub struct Output<MODE> {
4242
pub struct PushPull;
4343

4444
/// GPIO Pin speed selection
45+
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
4546
pub enum Speed {
4647
Low = 0,
4748
Medium = 1,
@@ -62,14 +63,14 @@ pub(crate) enum AltMode {
6263
}
6364

6465
#[cfg(feature = "stm32l0x1")]
65-
#[derive(Copy, Clone)]
66+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
6667
pub enum Port {
6768
PA,
6869
PB,
6970
}
7071

7172
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
72-
#[derive(Copy, Clone)]
73+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
7374
pub enum Port {
7475
PA,
7576
PB,

0 commit comments

Comments
 (0)