Skip to content

Commit 17cbc88

Browse files
authored
Merge pull request #261 from Sh3Rm4n/reduce-chip-noise-doc
Reduce chip variant noise in documentation
2 parents f18a64b + a400352 commit 17cbc88

File tree

2 files changed

+17
-58
lines changed

2 files changed

+17
-58
lines changed

README.md

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
`stm32f3xx-hal` contains a multi device hardware abstraction on top of the
88
peripheral access API for the STMicro STM32F3 series microcontrollers. The
99
selection of the MCU is done by feature gates, typically specified by board
10-
support crates. Currently supported configurations are:
10+
support crates. An excerpt of supported chip variants:
1111

1212
* stm32f301
1313
* stm32f318
@@ -77,37 +77,16 @@ This crate requires you to specify your target chip as a feature.
7777
[user manual][]. So you need to specify `stm32f303xc` in your `Cargo.toml`
7878
(note that VC → xc).*
7979

80-
#### Possible chips
81-
82-
[comment]: # (Any changes here should be mirrored in src/lib.rs)
83-
84-
Please select one of the following (`x` denotes any character in [a-z]):
85-
86-
* stm32f301x6
87-
* stm32f301x8
88-
* stm32f318x8
89-
* stm32f302x6
90-
* stm32f302x8
91-
* stm32f302xb
92-
* stm32f302xc
93-
* stm32f302xd
94-
* stm32f302xe
95-
* stm32f303x6
96-
* stm32f303x8
97-
* stm32f303xb
98-
* stm32f303xc
99-
* stm32f303xd
100-
* stm32f303xe
101-
* stm32f328x8
102-
* stm32f358xc
103-
* stm32f398xe
104-
* stm32f373x8
105-
* stm32f373xb
106-
* stm32f373xc
107-
* stm32f378xc
108-
* stm32f334x4
109-
* stm32f334x6
110-
* stm32f334x8
80+
All possible chip variants are selectable via cargo features.
81+
You can find a list [here, in the docs][chip-features].
82+
83+
#### Note
84+
85+
1. This features are mutually exclusive. Only one feature / chip variant can be
86+
chosen.
87+
2. You **have** to choose exactly **one** feature to build this crate at all.
88+
89+
[chip-features]: https://docs.rs/stm32f3xx-hal/latest/stm32f3xx_hal/#target-chip-selection
11190

11291
#### Background
11392

@@ -168,7 +147,4 @@ compile with older versions but that may change in any new patch release.
168147

169148
## Contributing
170149

171-
### Running Tests
172-
173-
See [`testsuite/README.md`](testsuite/README.md) for how to set up and run
174-
tests on the target.
150+
See [CONTRIBUTING.md](CONTRIBUTING.md)

src/lib.rs

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,14 @@
1414
1515
Please select one of the following (`x` denotes any character in [a-z]):
1616
17-
* stm32f301x6
18-
* stm32f301x8
19-
* stm32f318x8
20-
* stm32f302x6
21-
* stm32f302x8
22-
* stm32f302xb
23-
* stm32f302xc
24-
* stm32f302xd
25-
* stm32f302xe
26-
* stm32f303x6
27-
* stm32f303x8
28-
* stm32f303xb
29-
* stm32f303xc
30-
* stm32f303xd
31-
* stm32f303xe
17+
* stm32f301x6, stm32f301x8, stm32f318x8
18+
* stm32f302x6, stm32f302x8, stm32f302xb, stm32f302xc, stm32f302xd, stm32f302xe
19+
* stm32f303x6, stm32f303x8, stm32f303xb, stm32f303xc, stm32f303xd, stm32f303xe
3220
* stm32f328x8
3321
* stm32f358xc
3422
* stm32f398xe
35-
* stm32f373x8
36-
* stm32f373xb
37-
* stm32f373xc
38-
* stm32f378xc
39-
* stm32f334x4
40-
* stm32f334x6
41-
* stm32f334x8
23+
* stm32f373x8, stm32f373xb, stm32f373xc, stm32f378xc
24+
* stm32f334x4, stm32f334x6, stm32f334x8
4225
4326
Example: The STM32F3Discovery board has a STM32F303VCT6 chip.
4427
So you need to specify `stm32f303xc` in your `Cargo.toml` (note that VC → xc).

0 commit comments

Comments
 (0)