Skip to content

Commit 18437e0

Browse files
authored
Merge pull request #2099 from nnethercote/add-stm32f4
Add `stm32f4-0.15.1` benchmark
2 parents ebefdad + 6973a82 commit 18437e0

File tree

7,051 files changed

+1470320
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,051 files changed

+1470320
-0
lines changed

collector/compile-benchmarks/REUSE.toml

+5
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ path = "stm32f4-0.14.0/**"
235235
SPDX-FileCopyrightText = "stm32-rs contributors"
236236
SPDX-License-Identifier = "MIT OR Apache-2.0"
237237

238+
[[annotations]]
239+
path = "stm32f4-0.15.1/**"
240+
SPDX-FileCopyrightText = "stm32-rs contributors"
241+
SPDX-License-Identifier = "MIT OR Apache-2.0"
242+
238243
[[annotations]]
239244
path = "style-servo/**"
240245
SPDX-FileCopyrightText = "The Servo Project Developers"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/generic.rs b/src/generic.rs
2+
index d46b44a3..a2233c8c 100644
3+
--- a/src/generic.rs
4+
+++ b/src/generic.rs
5+
@@ -316,7 +316,7 @@ impl<FI> BitReader<FI> {
6+
/// Returns `true` if the bit is set (1).
7+
#[inline(always)]
8+
pub fn bit_is_set(&self) -> bool {
9+
- self.bit()
10+
+ !self.bit()
11+
}
12+
}
13+

collector/compile-benchmarks/stm32f4-0.15.1/Cargo.lock

+171
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
2+
#
3+
# When uploading crates to the registry Cargo will automatically
4+
# "normalize" Cargo.toml files for maximal compatibility
5+
# with all versions of Cargo and also rewrite `path` dependencies
6+
# to registry (e.g., crates.io) dependencies.
7+
#
8+
# If you are reading this file be aware that the original Cargo.toml
9+
# will likely look very different (and much more reasonable).
10+
# See Cargo.toml.orig for the original contents.
11+
12+
[package]
13+
edition = "2018"
14+
name = "stm32f4"
15+
version = "0.15.1"
16+
authors = [
17+
"Adam Greig <[email protected]>",
18+
"stm32-rs Contributors",
19+
]
20+
description = "Device support crates for STM32F4 devices"
21+
readme = "README.md"
22+
keywords = [
23+
"stm32",
24+
"svd2rust",
25+
"no_std",
26+
"embedded",
27+
]
28+
categories = [
29+
"embedded",
30+
"no-std",
31+
]
32+
license = "MIT/Apache-2.0"
33+
repository = "https://github.com/stm32-rs/stm32-rs"
34+
35+
[package.metadata.docs.rs]
36+
features = [
37+
"rt",
38+
"stm32f401",
39+
"stm32f407",
40+
"stm32f413",
41+
"stm32f469",
42+
]
43+
default-target = "thumbv7em-none-eabihf"
44+
targets = []
45+
46+
[dependencies.bare-metal]
47+
version = "1.0.0"
48+
49+
[dependencies.cortex-m]
50+
version = "0.7.2"
51+
52+
[dependencies.cortex-m-rt]
53+
version = ">=0.6.15,<0.8"
54+
optional = true
55+
56+
[dependencies.vcell]
57+
version = "0.1.3"
58+
59+
[features]
60+
default = ["rt"]
61+
rt = ["cortex-m-rt/device"]
62+
stm32f401 = []
63+
stm32f405 = []
64+
stm32f407 = []
65+
stm32f410 = []
66+
stm32f411 = []
67+
stm32f412 = []
68+
stm32f413 = []
69+
stm32f427 = []
70+
stm32f429 = []
71+
stm32f446 = []
72+
stm32f469 = []
73+
74+
[workspace]

collector/compile-benchmarks/stm32f4-0.15.1/Cargo.toml.orig

+40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# stm32f4
2+
This crate provides an autogenerated API for access to STM32F4 peripherals.
3+
The API is generated using [svd2rust] with patched svd files containing
4+
extensive type-safe support. For more information please see the [main repo].
5+
6+
Refer to the [documentation] for full details.
7+
8+
[svd2rust]: https://github.com/rust-embedded/svd2rust
9+
[main repo]: https://github.com/stm32-rs/stm32-rs
10+
[documentation]: https://docs.rs/stm32f4/latest/stm32f4/
11+
12+
## Usage
13+
Each device supported by this crate is behind a feature gate so that you only
14+
compile the device(s) you want. To use, in your Cargo.toml:
15+
16+
```toml
17+
[dependencies.stm32f4]
18+
version = "0.15.1"
19+
features = ["stm32f401"]
20+
```
21+
22+
The `rt` feature is enabled by default and brings in support for `cortex-m-rt`.
23+
To disable, specify `default-features = false` in `Cargo.toml`.
24+
25+
In your code:
26+
27+
```rust
28+
use stm32f4::stm32f401;
29+
30+
let mut peripherals = stm32f401::Peripherals::take().unwrap();
31+
let gpioa = &peripherals.GPIOA;
32+
gpioa.odr.modify(|_, w| w.odr0().set_bit());
33+
```
34+
35+
For full details on the autogenerated API, please see:
36+
https://docs.rs/svd2rust/0.24.1/svd2rust/#peripheral-api
37+
38+
## Supported Devices
39+
40+
| Module | Devices | Links |
41+
|:------:|:-------:|:-----:|
42+
| stm32f401 | STM32F401 | [RM0368](https://www.st.com/resource/en/reference_manual/dm00096844.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) |
43+
| stm32f405 | STM32F405, STM32F415 | [RM0090](https://www.st.com/resource/en/reference_manual/dm00031020.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) |
44+
| stm32f407 | STM32F407, STM32F417 | [RM0090](https://www.st.com/resource/en/reference_manual/dm00031020.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) |
45+
| stm32f410 | STM32F410 | [RM0401](https://www.st.com/resource/en/reference_manual/dm00180366.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f410.html) |
46+
| stm32f411 | STM32F411 | [RM0383](https://www.st.com/resource/en/reference_manual/dm00119316.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) |
47+
| stm32f412 | STM32F412 | [RM0402](https://www.st.com/resource/en/reference_manual/dm00180369.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f412.html) |
48+
| stm32f413 | STM32F413, STM32F423 | [RM0430](https://www.st.com/resource/en/reference_manual/dm00305666.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f413-423.html) |
49+
| stm32f427 | STM32F427, STM32F437 | [RM0090](https://www.st.com/resource/en/reference_manual/dm00031020.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f427-437.html) |
50+
| stm32f429 | STM32F429, STM32F439 | [RM0090](https://www.st.com/resource/en/reference_manual/dm00031020.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f429-439.html) |
51+
| stm32f446 | STM32F446 | [RM0390](https://www.st.com/resource/en/reference_manual/dm00135183.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) |
52+
| stm32f469 | STM32F469, STM32F479 | [RM0386](https://www.st.com/resource/en/reference_manual/dm00127514.pdf), [st.com](https://www.st.com/en/microcontrollers-microprocessors/stm32f469-479.html) |

0 commit comments

Comments
 (0)