@@ -105,9 +105,13 @@ pub trait PinExt {
105
105
}
106
106
107
107
/// Some alternate mode (type state)
108
+ #[ derive( Debug , Default ) ]
109
+ #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
108
110
pub struct Alternate < const A : u8 , Otype = PushPull > ( PhantomData < Otype > ) ;
109
111
110
112
/// Input mode (type state)
113
+ #[ derive( Debug , Default ) ]
114
+ #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
111
115
pub struct Input ;
112
116
113
117
/// Pull setting for an input.
@@ -123,17 +127,25 @@ pub enum Pull {
123
127
}
124
128
125
129
/// Open drain input or output (type state)
130
+ #[ derive( Debug , Default ) ]
131
+ #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
126
132
pub struct OpenDrain ;
127
133
128
134
/// Output mode (type state)
135
+ #[ derive( Debug , Default ) ]
136
+ #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
129
137
pub struct Output < MODE = PushPull > {
130
138
_mode : PhantomData < MODE > ,
131
139
}
132
140
133
141
/// Push pull output (type state)
142
+ #[ derive( Debug , Default ) ]
143
+ #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
134
144
pub struct PushPull ;
135
145
136
146
/// Analog mode (type state)
147
+ #[ derive( Debug , Default ) ]
148
+ #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
137
149
pub struct Analog ;
138
150
139
151
/// JTAG/SWD mote (type state)
0 commit comments