Skip to content

Commit 7d9954e

Browse files
authored
Merge pull request #179 from Sh3Rm4n/v0.6.0
Release v0.6.0
2 parents fc5c0a6 + 2e7445a commit 7d9954e

File tree

17 files changed

+94
-63
lines changed

17 files changed

+94
-63
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,12 @@ jobs:
138138
profile: minimal
139139
components: rustfmt
140140
- run: cd codegen && cargo check
141+
142+
markdown-lint:
143+
name: Markdown Lint
144+
runs-on: ubuntu-latest
145+
steps:
146+
- uses: nosborn/[email protected]
147+
with:
148+
files: .
149+
ignore_files: "target/"

.markdownlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
md024: false
2+
md014: false

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [v0.6.0] - 2020-12-10
11+
1012
### Added
1113

1214
- Support for 16-bit words with SPI ([#107](https://github.com/stm32-rs/stm32f3xx-hal/pull/107))
@@ -42,7 +44,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
4244
- Introduced auto-generated GPIO mappings based on the STM32CubeMX database
4345
([#129](https://github.com/stm32-rs/stm32f3xx-hal/pull/129))
4446

45-
4647
### Fixed
4748

4849
- Fixed [#151][] not being able to generate 72 MHz HCLK for stm32f303xc devices
@@ -62,8 +63,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6263
not mean, that we guarantee any MSRV policy. It is rather for documentation
6364
purposes and if a new useful feature arises, we will increase the MSRV.
6465
([#170](https://github.com/stm32-rs/stm32f3xx-hal/pull/170))
65-
- Removed I2C2 support for `stm32f303x6`, `stm32f303x8` and `stm32f328` targets. ([#164](https://github.com/stm32-rs/stm32f3xx-hal/pull/164))
66-
- `I2c::i2c1` and `I2c::i2c2` functions are renamed to `I2c::new`. ([#164](https://github.com/stm32-rs/stm32f3xx-hal/pull/164))
66+
- Removed I2C2 support for `stm32f303x6`, `stm32f303x8` and `stm32f328` targets.
67+
([#164](https://github.com/stm32-rs/stm32f3xx-hal/pull/164))
68+
- `I2c::i2c1` and `I2c::i2c2` functions are renamed to `I2c::new`.
69+
([#164](https://github.com/stm32-rs/stm32f3xx-hal/pull/164))
6770

6871
## [v0.5.0] - 2020-07-21
6972

@@ -83,6 +86,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
8386
- The system clock calculation is more fine grained now. ([#67](https://github.com/stm32-rs/stm32f3xx-hal/pull/67))
8487
Now the system clock can be some value, like 14 MHz, which can not a
8588
be represented as a multiple of the oscillator clock:
89+
8690
```rust
8791
let clocks = rcc
8892
.cfgr
@@ -95,11 +99,11 @@ let clocks = rcc
9599
.use_hse(32.mhz())
96100
.sysclk(72.mhz())
97101
```
102+
98103
This is possible through utilizing the divider, which can divide the
99104
external oscillator clock on most devices. Some devices have even the
100105
possibility to divide the internal oscillator clock.
101106

102-
103107
### Breaking changes
104108

105109
- The feature gate requires you to select a subvariant if possible. ([#75](https://github.com/stm32-rs/stm32f3xx-hal/pull/75))
@@ -157,15 +161,17 @@ let clocks = rcc
157161
- This allows using 72 MHz `sysclk` on the `stm32f303`
158162
- Analog gpio trait ([#33](https://github.com/stm32-rs/stm32f3xx-hal/pull/33))
159163
- Add PWM Channels ([#34](https://github.com/stm32-rs/stm32f3xx-hal/pull/34))
160-
- SPI embedded hal modes are now public ([#35](https://github.com/stm32-rs/stm32f3xx-hal/pull/18))
164+
- SPI embedded hal modes are now public
165+
([#35](https://github.com/stm32-rs/stm32f3xx-hal/pull/18))
161166

162167
### Breaking changes
163168

164-
- Alternate gpio functions are now **only** made available for devices, which have them.
165-
([#21](https://github.com/stm32-rs/stm32f3xx-hal/pull/21))
169+
- Alternate gpio functions are now **only** made available for devices, which
170+
have them. ([#21](https://github.com/stm32-rs/stm32f3xx-hal/pull/21))
166171
- `stm32f303` is now split into `stm32f303xd` and `stm32f303xe` as they provide
167172
different alternate gpio functions. `stm32f303` is still available.
168-
- Bump `stm32f3` dependency to `0.9.0` ([#39](https://github.com/stm32-rs/stm32f3xx-hal/pull/39))
173+
- Bump `stm32f3` dependency to `0.9.0`
174+
([#39](https://github.com/stm32-rs/stm32f3xx-hal/pull/39))
169175

170176
### Fixed
171177

@@ -250,7 +256,8 @@ let clocks = rcc
250256

251257
- Support `stm32f303` device
252258

253-
[Unreleased]: https://github.com/stm32-rs/stm32f3xx-hal/compare/v0.5.0...HEAD
259+
[Unreleased]: https://github.com/stm32-rs/stm32f3xx-hal/compare/v0.6.0...HEAD
260+
[v0.6.0]: https://github.com/stm32-rs/stm32f3xx-hal/compare/v0.5.0...v0.6.0
254261
[v0.5.0]: https://github.com/stm32-rs/stm32f3xx-hal/compare/v0.4.3...v0.5.0
255262
[v0.4.3]: https://github.com/stm32-rs/stm32f3xx-hal/compare/v0.4.2...v0.4.3
256263
[v0.4.2]: https://github.com/stm32-rs/stm32f3xx-hal/compare/v0.4.1...v0.4.2

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ name = "stm32f3xx-hal"
1313
readme = "README.md"
1414
repository = "https://github.com/stm32-rs/stm32f3xx-hal"
1515
documentation = "https://docs.rs/stm32f3xx-hal"
16-
version = "0.5.0"
16+
version = "0.6.0"
1717
exclude = [
1818
"codegen",
19+
".markdownlint.yml"
1920
]
2021

2122
[package.metadata.docs.rs]

README.md

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ peripheral access API for the STMicro STM32F3 series microcontrollers. The
99
selection of the MCU is done by feature gates, typically specified by board
1010
support crates. Currently supported configurations are:
1111

12-
* stm32f301 ✔️ YES!
13-
* stm32f318 ✔️ YES!
14-
* stm32f302 ✔️ YES!
15-
* stm32f303 ✔️ YES!
16-
* stm32f373 ✔️ YES!
17-
* stm32f378 ✔️ YES!
18-
* stm32f334 ✔️ YES!
19-
* stm32f328 ✔️ YES!
20-
* stm32f358 ✔️ YES!
21-
* stm32f398 ✔️ YES!
12+
* stm32f301
13+
* stm32f318
14+
* stm32f302
15+
* stm32f303
16+
* stm32f373
17+
* stm32f378
18+
* stm32f334
19+
* stm32f328
20+
* stm32f358
21+
* stm32f398
2222

2323
The idea behind this crate is to gloss over the slight differences in the
2424
various peripherals available on those MCUs so a HAL can be written for all
@@ -52,29 +52,30 @@ So you want to expand your call to `cargo` with `--features stm32f303xc`.*
5252
[comment]: # (Any changes here should be mirrored in src/lib.rs)
5353

5454
Note: `x` denotes any character in [a-z]
55-
* stm32f301xb
56-
* stm32f301xc
57-
* stm32f301xd
58-
* stm32f301xe
59-
* stm32f318
60-
* stm32f302xb
61-
* stm32f302xc
62-
* stm32f302xd
63-
* stm32f302xe
64-
* stm32f302x6
65-
* stm32f302x8
66-
* stm32f303xb
67-
* stm32f303xc
68-
* stm32f303xd
69-
* stm32f303xe
70-
* stm32f303x6
71-
* stm32f303x8
72-
* stm32f373
73-
* stm32f378
74-
* stm32f334
75-
* stm32f328
76-
* stm32f358
77-
* stm32f398
55+
56+
* stm32f301xb
57+
* stm32f301xc
58+
* stm32f301xd
59+
* stm32f301xe
60+
* stm32f318
61+
* stm32f302xb
62+
* stm32f302xc
63+
* stm32f302xd
64+
* stm32f302xe
65+
* stm32f302x6
66+
* stm32f302x8
67+
* stm32f303xb
68+
* stm32f303xc
69+
* stm32f303xd
70+
* stm32f303xe
71+
* stm32f303x6
72+
* stm32f303x8
73+
* stm32f373
74+
* stm32f378
75+
* stm32f334
76+
* stm32f328
77+
* stm32f358
78+
* stm32f398
7879

7980
### Background
8081

@@ -95,21 +96,30 @@ expect it to do so.*
9596

9697
### Detailed steps to select the right chip
9798

98-
1. Get the full name of the chip you are using from your datasheet, user manual or other source.
99+
1. Get the full name of the chip you are using from your datasheet, user manual
100+
or other source.
101+
102+
_Example_:
99103

100-
*Example: We want to use the STM32F3Discovery kit.*
101-
*The [Usermanual][] tells us it's using a STM32F303VC chip.*
104+
We want to use the STM32F3Discovery kit.
105+
The [Usermanual][] tells us it's using a STM32F303VC chip.
102106

103107
2. Find your chip as a feature in the list above.
104108

105-
*Example: Looking for the right feature for our STM32F303VC chip we first find
106-
`stm32f301xb`. This is the wrong chip, as we're not looking for `f301` but for `f303`.*
109+
_Example_:
107110

108-
*Looking further we find `stm32f303xc`. This matches STM32F303VC (note that VC → xc).*
111+
Looking for the right feature for our STM32F303VC chip we first find
112+
`stm32f301xb`. This is the wrong chip, as we're not looking for `f301` but
113+
for `f303`.
114+
115+
Looking further we find `stm32f303xc`. This matches STM32F303VC
116+
(note that VC → xc).
109117

110118
3. Add the chip name as a feature to your cargo call.
111119

112-
*Example: Using the STM32F303VC chip we run `cargo check --features stm32f303xc`.*
120+
_Example_:
121+
122+
Using the STM32F303VC chip we run `cargo check --features stm32f303xc`.
113123

114124
[Usermanual]: https://www.st.com/content/ccc/resource/technical/document/user_manual/8a/56/97/63/8d/56/41/73/DM00063382.pdf/files/DM00063382.pdf/jcr:content/translations/en.DM00063382.pdf
115125

codegen/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Because by default cargo tries to use the `x86_64-unknown-linux-gnu` target,
1212
when building `codegen`, due to what's specified in the `.cargo/config`, you
1313
need to manually specify your host's target if it differs from that, e.g.:
1414

15-
```
15+
```bash
1616
$ cargo run --target x86_64-apple-darwin -- help
1717
```
1818

@@ -26,7 +26,7 @@ Running `codegen`'s `gpio` subcommand generates the `gpio!` macro
2626
invocations at the end of `src/gpio.rs`. Re-generating those macro-invocations
2727
is simply a matter of deleting the old ones and then executing:
2828

29-
```
29+
```bash
3030
$ cargo run -- gpio $cubemx_db_path >> ../src/gpio.rs
3131
```
3232

examples/adc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
use panic_semihosting as _;
77

8+
use cortex_m::asm;
89
use cortex_m_rt::entry;
910
use cortex_m_semihosting::hprintln;
1011

@@ -55,5 +56,6 @@ fn main() -> ! {
5556
loop {
5657
let adc1_in1_data: u16 = adc1.read(&mut adc1_in1_pin).expect("Error reading adc1.");
5758
hprintln!("PA0 reads {}", adc1_in1_data).ok();
59+
asm::delay(2_000_000);
5860
}
5961
}

examples/gpio_erased.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn main() -> ! {
5050
loop {
5151
for pin in pin_array.iter_mut() {
5252
hprintln!("Value is {}", pin.is_high().unwrap()).unwrap();
53-
asm::delay(1_000);
53+
asm::delay(1_000_000);
5454
}
5555
}
5656
}

src/adc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! It can be built for the STM32F3Discovery running
88
//! `cargo build --example adc --features=stm32f303xc`
99
//!
10-
//! [examples/adc.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.5.0/examples/adc.rs
10+
//! [examples/adc.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.6.0/examples/adc.rs
1111
1212
use crate::{
1313
gpio::Analog,

src/can.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//!
1010
//! A usage example of the can peripheral can be found at [examples/can.rs]
1111
//!
12-
//! [examples/can.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.5.0/examples/can.rs
12+
//! [examples/can.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.6.0/examples/can.rs
1313
1414
pub use embedded_hal_can::{self, Filter, Frame, Id, Receiver, Transmitter};
1515

0 commit comments

Comments
 (0)