forked from David-OConnor/stm32-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
142 lines (121 loc) · 4.34 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[package]
name = "stm32-hal2"
version = "0.2.6"
authors = ["David O'Connor <david.alan.oconnor@gmail.com>"]
description = "Hardware abstraction layer for the stm32 chips"
keywords = ["no-std", "stm32", "embedded", "embedded-hal"]
categories = [
"embedded",
"hardware-support",
"no-std",
]
repository = "https://github.com/David-OConnor/stm32-hal"
documentation = "https://docs.rs/stm32-hal2"
readme = "README.md"
license = "MIT OR Apache-2.0"
exclude = [".gitignore"]
edition = "2018"
[dependencies]
cortex-m = "0.7.1"
# Peripheral Access Crates
stm32f3 = { version = "0.13.0", optional = true }
stm32f4 = { version = "0.13.0", optional = true }
stm32l4 = { version = "0.13.0", optional = true }
stm32l5 = { version = "0.13.0", optional = true }
stm32g0 = { version = "0.13.0", optional = true }
stm32g4 = { version = "0.13.0", optional = true }
stm32h7 = { version = "0.13.0", optional = true }
# Embedded traits
embedded-hal = { version = "0.2.4", features = ["unproven"] }
rtcc = "0.2" # Embedded datetime traits.
stm32-usbd = { version = "0.6.0", optional = true }
# Misc features
cast = { version = "0.2.2", default-features = false }
nb = "1.0.0"
num-traits = { version = "0.2.14", default-features = false, features=["libm"] } # For sqrt in timers
void = { version = "1.0.2", default-features = false } # One off in `timer.rs`. Remove it A/R.
# Meta-programming
cfg-if = "1.0.0" # if/else blocks for feature-gating
paste = "1.0.4" # Token pasting, to make macros easier.
# todo: These are required by the l4 Serial and DMA implementation. Is it worth having these dependencies?
# todo: Can we remove them?
as-slice = "0.1"
generic-array = "0.13"
stable_deref_trait = { version = "1.1", default-features = false }
[package.metadata.docs.rs]
features = ["l4rt", "l4x3", "usb"]
targets = ["thumbv7em-none-eabihf"]
# Compile with one of these "runtime" features if the program
# will be directly flashed to an MCU; ie not a library.
[features]
f3rt = ["stm32f3/rt"]
f4rt = ["stm32f4/rt"]
l4rt = ["stm32l4/rt"]
l5rt = ["stm32l5/rt"]
g0rt = ["stm32g0/rt"]
g4rt = ["stm32g4/rt"]
h7rt = ["stm32h7/rt"]
# Features defined here are those taken from the SVD-generated STM32 PACs.
# [F3](https://docs.rs/crate/stm32f3/0.13.0/source/Cargo.toml)
f301 = ["stm32f3/stm32f301", "f3"]
f302 = ["stm32f3/stm32f302", "f3"]
f303 = ["stm32f3/stm32f303", "f3"]
f373 = ["stm32f3/stm32f373", "f3"]
f3x4 = ["stm32f3/stm32f3x4", "f3"]
# [F4](https://docs.rs/crate/stm32f4/0.13.0/source/Cargo.toml)
f401 = ["stm32f4/stm32f401", "f4"]
f405 = ["stm32f4/stm32f405", "f4"]
f407 = ["stm32f4/stm32f407", "f4"]
f410 = ["stm32f4/stm32f410", "f4"]
f411 = ["stm32f4/stm32f411", "f4"]
f412 = ["stm32f4/stm32f412", "f4"]
f413 = ["stm32f4/stm32f413", "f4"]
f427 = ["stm32f4/stm32f427", "f4"]
f429 = ["stm32f4/stm32f429", "f4"]
f446 = ["stm32f4/stm32f446", "f4"]
f469 = ["stm32f4/stm32f469", "f4"]
# [L4](https://docs.rs/crate/stm32l4/0.13.0/source/Cargo.toml)
l4x1 = ["stm32l4/stm32l4x1", "l4"]
l4x2 = ["stm32l4/stm32l4x2", "l4"]
l4x3 = ["stm32l4/stm32l4x3", "l4"]
l4x5 = ["stm32l4/stm32l4x5", "l4"]
l4x6 = ["stm32l4/stm32l4x6", "l4"]
# todo: Handle l4+ (P, R, S, Q)
# [L5](https://docs.rs/crate/stm32l5/0.13.0/source/Cargo.toml)
l552 = ["stm32l5/stm32l552", "l5"]
l562 = ["stm32l5/stm32l562", "l5"]
# [G0](https://docs.rs/crate/stm32g0/0.13.0/source/Cargo.toml)
g030 = ["stm32g0/stm32g030", "g0"]
g031 = ["stm32g0/stm32g031", "g0"]
g041 = ["stm32g0/stm32g041", "g0"]
g070 = ["stm32g0/stm32g070", "g0"]
g071 = ["stm32g0/stm32g071", "g0"]
g081 = ["stm32g0/stm32g081", "g0"]
# [G4](https://docs.rs/crate/stm32g4/0.13.0/source/Cargo.toml)
g431 = ["stm32g4/stm32g431", "g4"]
g441 = ["stm32g4/stm32g441", "g4"]
g471 = ["stm32g4/stm32g471", "g4"]
g473 = ["stm32g4/stm32g473", "g4"]
g474 = ["stm32g4/stm32g474", "g4"]
g483 = ["stm32g4/stm32g483", "g4"]
g484 = ["stm32g4/stm32g484", "g4"]
g491 = ["stm32g4/stm32g491", "g4"]
g4a1 = ["stm32g4/stm32g4a1", "g4"]
# [H7](https://docs.rs/crate/stm32h7/0.13.0/source/Cargo.toml)
h743 = ["stm32h7/stm32h743", "h7"]
h743v = ["stm32h7/stm32h743v", "h7"]
h747cm4 = ["stm32h7/stm32h747cm4", "h7"]
h747cm7 = ["stm32h7/stm32h747cm7", "h7"]
h753 = ["stm32h7/stm32h753", "h7"]
h753v = ["stm32h7/stm32h753v", "h7"]
h7b3 = ["stm32h7/stm32h7b3", "h7"]
usb = ["stm32-usbd"]
# These features are used to featured gate sections of code that apply
# to an entire family.
f3 = []
f4 = []
l4 = []
l5 = []
g0 = []
g4 = []
h7 = []