Skip to content

Commit 7ff1714

Browse files
authored
fix(README.md): outdated code example (#126)
* fix(README.md): outdated code example * chore: add a changelog
1 parent 8083797 commit 7ff1714

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

33
## Unreleased - ReleaseDate
4+
### Fixed
5+
- Outdated code example in `README.md` is fixed.
46

57
## 0.8.2 - 2021-05-13
68
### Removed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ This crate is `#![no_std]` compatible.
1818
let mut r = unsafe { xhci::Registers::new(MMIO_BASE, mapper) };
1919
let o = &mut r.operational;
2020

21-
o.usbcmd.update(|u| u.set_run_stop(true));
21+
o.usbcmd.update(|u| {
22+
u.set_run_stop();
23+
});
2224
while o.usbsts.read().hc_halted() {}
2325
```

0 commit comments

Comments
 (0)