Skip to content

Commit 6d92ee4

Browse files
authored
8.3: Use write instead of modify
Since the read value is ignored, using `modify` seems redundant. Also, `modify` isn't mentioned in the text prior this chapter, while `write` is explained.
1 parent e7c5527 commit 6d92ee4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/08-leds-again/the-solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ fn main() -> ! {
1212
let (gpioe, rcc) = aux8::init();
1313

1414
// enable the GPIOE peripheral
15-
rcc.ahbenr.modify(|_, w| w.iopeen().set_bit());
15+
rcc.ahbenr.write(|w| w.iopeen().set_bit());
1616

1717
// configure the pins as outputs
18-
gpioe.moder.modify(|_, w| {
18+
gpioe.moder.write(|w| {
1919
w.moder8().output();
2020
w.moder9().output();
2121
w.moder10().output();

0 commit comments

Comments
 (0)