Skip to content

Commit 2feec2f

Browse files
committed
document-features
1 parent 0b6cecc commit 2feec2f

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

Cargo.toml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ systick-monotonic = { version = "1.0", optional = true }
4949
enumflags2 = "0.7.8"
5050
embedded-storage = "0.3"
5151
vcell = "0.1.3"
52+
document-features = "0.2"
5253

5354
[dependencies.time]
5455
version = "0.3.14"
@@ -98,6 +99,11 @@ default-features = false
9899
features = ["macros"]
99100

100101
[features]
102+
#! Use one of the supported STM32-serie related features:
103+
#! `stm32f401`, `stm32f405`, `stm32f407`, `stm32f415`, `stm32f417`, `stm32f410`,
104+
#! `stm32f411`, `stm32f412`, `stm32f413`, `stm32f423`, `stm32f427`, `stm32f429`,
105+
#! `stm32f437`, `stm32f439`, `stm32f446`, `stm32f469`, `stm32f479`.
106+
101107
# Note: stm32f4 has only one feature for some very similar device families,
102108
# so it's intended for e.g. stm32f405/415 to both enable stm32f4/stm32f405.
103109
stm32f401 = ["stm32f4/stm32f401"]
@@ -118,18 +124,28 @@ stm32f446 = ["stm32f4/stm32f446"]
118124
stm32f469 = ["stm32f4/stm32f469"]
119125
stm32f479 = ["stm32f4/stm32f469"]
120126

121-
usb_fs = ["synopsys-usb-otg", "synopsys-usb-otg/fs"]
122-
usb_hs = ["synopsys-usb-otg", "synopsys-usb-otg/hs"]
127+
## Support monotonic timers that can be used by [RTIC framework](https://crates.io/crates/cortex-m-rtic)
128+
rtic = ["dep:rtic-monotonic", "dep:systick-monotonic"]
129+
130+
## Implementation of `defmt::Format` for public enums and structures. See [defmt](https://crates.io/crates/defmt)
131+
defmt = ["dep:defmt", "fugit/defmt", "nb/defmt-0-3"]
123132

124-
can = ["bxcan"]
133+
## bxCAN peripheral support. See [bxcan](https://crates.io/crates/bxcan)
134+
can = ["dep:bxcan"]
125135

126-
i2s = ["stm32_i2s_v12x"]
136+
## I2S peripheral support. See [stm32_i2s_v12x](https://crates.io/crates/stm32_i2s_v12x)
137+
i2s = ["dep:stm32_i2s_v12x"]
127138

128-
fsmc_lcd = ["display-interface"]
139+
## USB OTG-FS peripheral support. See [synopsys-usb-otg](https://crates.io/crates/synopsys-usb-otg)
140+
usb_fs = ["dep:synopsys-usb-otg", "synopsys-usb-otg/fs"]
141+
## USB OTG-HS peripheral support. See [synopsys-usb-otg](https://crates.io/crates/synopsys-usb-otg)
142+
usb_hs = ["dep:synopsys-usb-otg", "synopsys-usb-otg/hs"]
129143

130-
defmt = ["dep:defmt", "fugit/defmt", "nb/defmt-0-3"]
144+
## LCD support via FMC/FSMC peripheral. See [display-interface](https://crates.io/crates/display-interface)
145+
fsmc_lcd = ["dep:display-interface"]
131146

132-
rtic = ["rtic-monotonic", "systick-monotonic"]
147+
## SDIO peripheral support. See [sdio-host](https://crates.io/crates/sdio-host)
148+
sdio-host = ["dep:sdio-host"]
133149

134150
[profile.dev]
135151
debug = true

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! Multi device hardware abstraction on top of the peripheral access API for the STMicro STM32F4 series microcontrollers.
2+
//!
3+
//! ## Feature flags
4+
#![doc = document_features::document_features!()]
5+
16
#![no_std]
27
#![allow(non_camel_case_types)]
38

0 commit comments

Comments
 (0)