Skip to content

Commit ba26ed1

Browse files
author
Jonathan Pallant
committed
Write closures need to return the magic object.
1 parent c491718 commit ba26ed1

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

nrf52-hal-common/src/gpio.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ impl<MODE> Pin<MODE> {
8888
w.pull().disabled();
8989
w.drive().s0s1();
9090
w.sense().disabled();
91+
w
9192
});
9293

9394
Pin {
@@ -121,6 +122,7 @@ impl<MODE> Pin<MODE> {
121122
w.pull().pullup();
122123
w.drive().s0s1();
123124
w.sense().disabled();
125+
w
124126
});
125127

126128
Pin {
@@ -154,6 +156,7 @@ impl<MODE> Pin<MODE> {
154156
w.pull().pulldown();
155157
w.drive().s0s1();
156158
w.sense().disabled();
159+
w
157160
});
158161

159162
Pin {
@@ -201,6 +204,7 @@ impl<MODE> Pin<MODE> {
201204
w.pull().disabled();
202205
w.drive().s0s1();
203206
w.sense().disabled();
207+
w
204208
});
205209

206210
pin
@@ -252,6 +256,7 @@ impl<MODE> Pin<MODE> {
252256
w.pull().disabled();
253257
w.drive().variant(config.variant());
254258
w.sense().disabled();
259+
w
255260
});
256261

257262
pin
@@ -480,6 +485,7 @@ macro_rules! gpio {
480485
w.pull().disabled();
481486
w.drive().s0s1();
482487
w.sense().disabled();
488+
w
483489
});
484490

485491
$PXi {
@@ -493,6 +499,7 @@ macro_rules! gpio {
493499
w.pull().pulldown();
494500
w.drive().s0s1();
495501
w.sense().disabled();
502+
w
496503
});
497504

498505
$PXi {
@@ -506,6 +513,7 @@ macro_rules! gpio {
506513
w.pull().pullup();
507514
w.drive().s0s1();
508515
w.sense().disabled();
516+
w
509517
});
510518

511519
$PXi {
@@ -532,6 +540,7 @@ macro_rules! gpio {
532540
w.pull().disabled();
533541
w.drive().s0s1();
534542
w.sense().disabled();
543+
w
535544
});
536545

537546
pin
@@ -567,6 +576,7 @@ macro_rules! gpio {
567576
w.pull().disabled();
568577
w.drive().variant(config.variant());
569578
w.sense().disabled();
579+
w
570580
});
571581

572582
pin

nrf52-hal-common/src/saadc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ impl Saadc {
5151
w.resp().variant(resistor);
5252
w.resn().bypass();
5353
w.burst().enabled();
54+
w
5455
});
5556
saadc.ch[0].pseln.write(|w| w.pseln().nc());
5657

nrf52-hal-common/src/spim.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ where
141141
w.cpol().active_low();
142142
w.cpha().trailing();
143143
}
144+
w
144145
});
145146

146147
// Configure frequency

0 commit comments

Comments
 (0)