File tree 2 files changed +414
-117
lines changed
2 files changed +414
-117
lines changed Original file line number Diff line number Diff line change 5
5
use core:: marker:: PhantomData ;
6
6
7
7
/// Input mode (type state)
8
+ #[ derive( Debug ) ]
8
9
pub struct Input < MODE > {
9
10
_mode : PhantomData < MODE > ,
10
11
}
11
12
12
13
/// Floating input (type state)
14
+ #[ derive( Debug ) ]
13
15
pub struct Floating ;
14
16
/// Pulled down input (type state)
17
+ #[ derive( Debug ) ]
15
18
pub struct PullDown ;
16
19
/// Pulled up input (type state)
20
+ #[ derive( Debug ) ]
17
21
pub struct PullUp ;
18
22
19
23
/// Output mode (type state)
24
+ #[ derive( Debug ) ]
20
25
pub struct Output < MODE > {
21
26
_mode : PhantomData < MODE > ,
22
27
}
23
28
24
29
/// Push pull output (type state)
30
+ #[ derive( Debug ) ]
25
31
pub struct PushPull ;
26
32
/// Open drain output (type state)
33
+ #[ derive( Debug ) ]
27
34
pub struct OpenDrain ;
28
35
29
36
// /// Alternate function
@@ -43,6 +50,7 @@ pub enum Level {
43
50
// across all of the possible pins
44
51
// ===============================================================
45
52
/// Generic $PX pin
53
+ #[ derive( Debug ) ]
46
54
pub struct Pin < MODE > {
47
55
pub pin : u8 ,
48
56
#[ cfg( feature = "52840" ) ]
You can’t perform that action at this time.
0 commit comments