@@ -83,16 +83,11 @@ impl<MODE> Pin<MODE> {
83
83
. pin_cnf [ self . pin as usize ]
84
84
}
85
85
. write ( |w| {
86
- w. dir ( )
87
- . input ( )
88
- . input ( )
89
- . connect ( )
90
- . pull ( )
91
- . disabled ( )
92
- . drive ( )
93
- . s0s1 ( )
94
- . sense ( )
95
- . disabled ( )
86
+ w. dir ( ) . input ( ) ;
87
+ w. input ( ) . connect ( ) ;
88
+ w. pull ( ) . disabled ( ) ;
89
+ w. drive ( ) . s0s1 ( ) ;
90
+ w. sense ( ) . disabled ( ) ;
96
91
} ) ;
97
92
98
93
Pin {
@@ -121,16 +116,11 @@ impl<MODE> Pin<MODE> {
121
116
. pin_cnf [ self . pin as usize ]
122
117
}
123
118
. write ( |w| {
124
- w. dir ( )
125
- . input ( )
126
- . input ( )
127
- . connect ( )
128
- . pull ( )
129
- . pullup ( )
130
- . drive ( )
131
- . s0s1 ( )
132
- . sense ( )
133
- . disabled ( )
119
+ w. dir ( ) . input ( ) ;
120
+ w. input ( ) . connect ( ) ;
121
+ w. pull ( ) . pullup ( ) ;
122
+ w. drive ( ) . s0s1 ( ) ;
123
+ w. sense ( ) . disabled ( ) ;
134
124
} ) ;
135
125
136
126
Pin {
@@ -159,16 +149,11 @@ impl<MODE> Pin<MODE> {
159
149
. pin_cnf [ self . pin as usize ]
160
150
}
161
151
. write ( |w| {
162
- w. dir ( )
163
- . input ( )
164
- . input ( )
165
- . connect ( )
166
- . pull ( )
167
- . pulldown ( )
168
- . drive ( )
169
- . s0s1 ( )
170
- . sense ( )
171
- . disabled ( )
152
+ w. dir ( ) . input ( ) ;
153
+ w. input ( ) . connect ( ) ;
154
+ w. pull ( ) . pulldown ( ) ;
155
+ w. drive ( ) . s0s1 ( ) ;
156
+ w. sense ( ) . disabled ( ) ;
172
157
} ) ;
173
158
174
159
Pin {
@@ -211,16 +196,11 @@ impl<MODE> Pin<MODE> {
211
196
. pin_cnf [ self . pin as usize ]
212
197
}
213
198
. write ( |w| {
214
- w. dir ( )
215
- . output ( )
216
- . input ( )
217
- . connect ( ) // AJM - hack for SPI
218
- . pull ( )
219
- . disabled ( )
220
- . drive ( )
221
- . s0s1 ( )
222
- . sense ( )
223
- . disabled ( )
199
+ w. dir ( ) . output ( ) ;
200
+ w. input ( ) . connect ( ) ; // AJM - hack for SPI
201
+ w. pull ( ) . disabled ( ) ;
202
+ w. drive ( ) . s0s1 ( ) ;
203
+ w. sense ( ) . disabled ( ) ;
224
204
} ) ;
225
205
226
206
pin
@@ -267,16 +247,11 @@ impl<MODE> Pin<MODE> {
267
247
. pin_cnf [ self . pin as usize ]
268
248
} ;
269
249
pin_cnf. write ( |w| {
270
- w. dir ( )
271
- . output ( )
272
- . input ( )
273
- . disconnect ( )
274
- . pull ( )
275
- . disabled ( )
276
- . drive ( )
277
- . variant ( config. variant ( ) )
278
- . sense ( )
279
- . disabled ( )
250
+ w. dir ( ) . output ( ) ;
251
+ w. input ( ) . disconnect ( ) ;
252
+ w. pull ( ) . disabled ( ) ;
253
+ w. drive ( ) . variant ( config. variant ( ) ) ;
254
+ w. sense ( ) . disabled ( ) ;
280
255
} ) ;
281
256
282
257
pin
@@ -500,11 +475,11 @@ macro_rules! gpio {
500
475
/// Convert the pin to be a floating input
501
476
pub fn into_floating_input( self ) -> $PXi<Input <Floating >> {
502
477
unsafe { & ( * $PX:: ptr( ) ) . pin_cnf[ $i] } . write( |w| {
503
- w. dir( ) . input( )
504
- . input( ) . connect( )
505
- . pull( ) . disabled( )
506
- . drive( ) . s0s1( )
507
- . sense( ) . disabled( )
478
+ w. dir( ) . input( ) ;
479
+ w . input( ) . connect( ) ;
480
+ w . pull( ) . disabled( ) ;
481
+ w . drive( ) . s0s1( ) ;
482
+ w . sense( ) . disabled( ) ;
508
483
} ) ;
509
484
510
485
$PXi {
@@ -513,11 +488,11 @@ macro_rules! gpio {
513
488
}
514
489
pub fn into_pulldown_input( self ) -> $PXi<Input <PullDown >> {
515
490
unsafe { & ( * $PX:: ptr( ) ) . pin_cnf[ $i] } . write( |w| {
516
- w. dir( ) . input( )
517
- . input( ) . connect( )
518
- . pull( ) . pulldown( )
519
- . drive( ) . s0s1( )
520
- . sense( ) . disabled( )
491
+ w. dir( ) . input( ) ;
492
+ w . input( ) . connect( ) ;
493
+ w . pull( ) . pulldown( ) ;
494
+ w . drive( ) . s0s1( ) ;
495
+ w . sense( ) . disabled( ) ;
521
496
} ) ;
522
497
523
498
$PXi {
@@ -526,11 +501,11 @@ macro_rules! gpio {
526
501
}
527
502
pub fn into_pullup_input( self ) -> $PXi<Input <PullUp >> {
528
503
unsafe { & ( * $PX:: ptr( ) ) . pin_cnf[ $i] } . write( |w| {
529
- w. dir( ) . input( )
530
- . input( ) . connect( )
531
- . pull( ) . pullup( )
532
- . drive( ) . s0s1( )
533
- . sense( ) . disabled( )
504
+ w. dir( ) . input( ) ;
505
+ w . input( ) . connect( ) ;
506
+ w . pull( ) . pullup( ) ;
507
+ w . drive( ) . s0s1( ) ;
508
+ w . sense( ) . disabled( ) ;
534
509
} ) ;
535
510
536
511
$PXi {
@@ -552,11 +527,11 @@ macro_rules! gpio {
552
527
}
553
528
554
529
unsafe { & ( * $PX:: ptr( ) ) . pin_cnf[ $i] } . write( |w| {
555
- w. dir( ) . output( )
556
- . input( ) . disconnect( )
557
- . pull( ) . disabled( )
558
- . drive( ) . s0s1( )
559
- . sense( ) . disabled( )
530
+ w. dir( ) . output( ) ;
531
+ w . input( ) . disconnect( ) ;
532
+ w . pull( ) . disabled( ) ;
533
+ w . drive( ) . s0s1( ) ;
534
+ w . sense( ) . disabled( ) ;
560
535
} ) ;
561
536
562
537
pin
@@ -587,12 +562,11 @@ macro_rules! gpio {
587
562
& ( * $PX:: ptr( ) ) . pin_cnf[ $i]
588
563
} ;
589
564
pin_cnf. write( |w| {
590
- w
591
- . dir( ) . output( )
592
- . input( ) . disconnect( )
593
- . pull( ) . disabled( )
594
- . drive( ) . variant( config. variant( ) )
595
- . sense( ) . disabled( )
565
+ w. dir( ) . output( ) ;
566
+ w. input( ) . disconnect( ) ;
567
+ w. pull( ) . disabled( ) ;
568
+ w. drive( ) . variant( config. variant( ) ) ;
569
+ w. sense( ) . disabled( ) ;
596
570
} ) ;
597
571
598
572
pin
0 commit comments