Skip to content

Commit 60cff79

Browse files
committed
v0.8.0
1 parent 968fbc5 commit 60cff79

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed

CHANGELOG.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,46 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.8.0] - 2017-05-29
11+
12+
### Added
13+
14+
- `derivedFrom` between peripherals. That means that `<enumeratedValues
15+
derivedFrom="peripheral.register.field.enumeratedValue">` will now work.
16+
17+
### Changed
18+
19+
- [breaking-change]. The API of 1-bit fields has been changed to work with
20+
`bool` instead of with `u8`.
21+
22+
Old API
23+
24+
``` rust
25+
// Read
26+
if peripheral.register.read().field().bits() == 1 { /* something */}
27+
28+
// Write
29+
peripheral.register.write(|w| unsafe { w.field().bits(1) });
30+
```
31+
32+
New API
33+
34+
``` rust
35+
// Read
36+
if peripheral.register.read().field().bit() { /* something */}
37+
// OR
38+
if peripheral.register.read().field().is_set() { /* something */}
39+
40+
// Write. Note that this operation is now safe
41+
peripheral.register.write(|w| w.field().bit(true));
42+
// OR
43+
peripheral.register.write(|w| w.field().set());
44+
```
45+
### Fixed
46+
47+
- Don't generate code for reserved bit-fields as we shouldn't expose an API to
48+
modify those fields.
49+
1050
## [v0.7.2] - 2017-05-08
1151

1252
### Fixed
@@ -165,7 +205,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
165205

166206
- Initial version of the `svd2rust` tool
167207

168-
[Unreleased]: https://github.com/japaric/svd2rust/compare/v0.7.2...HEAD
208+
[Unreleased]: https://github.com/japaric/svd2rust/compare/v0.8.0...HEAD
209+
[v0.8.0]: https://github.com/japaric/svd2rust/compare/v0.7.2...v0.8.0
169210
[v0.7.2]: https://github.com/japaric/svd2rust/compare/v0.7.1...v0.7.2
170211
[v0.7.1]: https://github.com/japaric/svd2rust/compare/v0.7.0...v0.7.1
171212
[v0.7.0]: https://github.com/japaric/svd2rust/compare/v0.6.2...v0.7.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords = ["arm", "cortex-m", "register", "map", "generator"]
88
license = "MIT OR Apache-2.0"
99
name = "svd2rust"
1010
repository = "https://github.com/japaric/svd2rust"
11-
version = "0.7.2"
11+
version = "0.8.0"
1212

1313
[dependencies]
1414
cast = "0.2.0"

0 commit comments

Comments
 (0)