Skip to content

Commit 37e28b4

Browse files
authored
Merge pull request #271 from Sh3Rm4n/usb
Rename stm32-usbd feature to usb
2 parents fa1cff3 + 9e7cfcf commit 37e28b4

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6262
- The `embedded-hal` Read implementation of `Serial` does now return `WoudBlock`
6363
if the peripheral is busy. Also if an `Overrun` occured the receive data
6464
register (RDR) is flushed to have a more consistent API. ([#253])
65-
- Remove `cargo-metadata` as a build dependency to cut down dependencies and
65+
- Remove `cargo-metadata` as a build dependency to cut down dependencies and
6666
the reliance on `resolver = "2"`. ([#270])
6767

6868
### Fixed
@@ -115,6 +115,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
115115
- Adc's `SampleTime` type has been reworked and is now a consistent wrapper around
116116
the underlying types for `stm32f3`'s `SMP9_A` and `SMP18_A` type. ([#266])
117117
- Rename `CkMode` to `ClockMode` ([#266])
118+
- Rename `stm32-usbd` feature to `usb`. `stm32-usbd` is still used as a
119+
dependency. ([#271])
118120

119121
## [v0.7.0] - 2021-06-18
120122

@@ -440,6 +442,7 @@ let clocks = rcc
440442
[defmt]: https://github.com/knurling-rs/defmt
441443
[filter]: https://defmt.ferrous-systems.com/filtering.html
442444

445+
[#271]: https://github.com/stm32-rs/stm32f3xx-hal/pull/271
443446
[#270]: https://github.com/stm32-rs/stm32f3xx-hal/pull/270
444447
[#266]: https://github.com/stm32-rs/stm32f3xx-hal/pull/266
445448
[#265]: https://github.com/stm32-rs/stm32f3xx-hal/pull/265

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ members = [
2828
]
2929

3030
[package.metadata.docs.rs]
31-
features = ["stm32f303xc", "rt", "stm32-usbd", "can"]
31+
features = ["stm32f303xc", "rt", "usb", "can"]
3232
targets = ["thumbv7em-none-eabihf"]
3333
rustc-args = ["--cfg", "docsrs"]
3434

3535
[dependencies]
3636
cfg-if = "1.0.0"
3737
cortex-m = "0.7.2"
3838
cortex-m-rt = "0.6.14"
39-
defmt = { version = "0.2.2", optional = true }
39+
defmt = { version = "0.2.3", optional = true }
4040
embedded-dma = "0.1.2"
4141
embedded-hal = { version = "0.2.5", features = ["unproven"] }
4242
embedded-time = "0.12.0"
@@ -73,6 +73,7 @@ direct-call-deprecated = []
7373
ld = []
7474
rt = ["stm32f3/rt"]
7575
can = ["bxcan"]
76+
usb = ["stm32-usbd"]
7677

7778
svd-f301 = ["stm32f3/stm32f301"]
7879
svd-f302 = ["stm32f3/stm32f302"]
@@ -170,7 +171,7 @@ required-features = ["ld", "stm32f303xc"]
170171

171172
[[example]]
172173
name = "usb_serial"
173-
required-features = ["ld", "stm32f303xc", "stm32-usbd"]
174+
required-features = ["ld", "stm32f303xc", "usb"]
174175

175176
[[example]]
176177
name = "spi"

src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@
7676
### `can`
7777
7878
Enable CAN peripherals on supported targets.
79+
The can implementation of the interface is backed by [`bxcan`](https://crates.io/crates/bxcan)
7980
80-
### `stm32-usbd`
81+
### `usb`
8182
82-
Enable USB peripherals on supported targets.
83+
Enable USB peripherals on supported targets via the [`stm32-usbd`](https://crates.io/crates/sttm32-usbd) crate.
8384
8485
### `enumset`
8586
@@ -184,15 +185,15 @@ pub mod spi;
184185
pub mod syscfg;
185186
pub mod timer;
186187
#[cfg(all(
187-
feature = "stm32-usbd",
188+
feature = "usb",
188189
any(
189190
feature = "stm32f303xb",
190191
feature = "stm32f303xc",
191192
feature = "stm32f303xd",
192193
feature = "stm32f303xe",
193194
),
194195
))]
195-
#[cfg_attr(docsrs, doc(cfg(feature = "stm32-usbd")))]
196+
#[cfg_attr(docsrs, doc(cfg(feature = "usb")))]
196197
pub mod usb;
197198
pub mod watchdog;
198199

0 commit comments

Comments
 (0)