forked from David-OConnor/stm32-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
189 lines (163 loc) · 6.95 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
[package]
name = "stm32-hal2"
version = "1.0.3"
authors = ["David O'Connor <[email protected]>"]
description = "Hardware abstraction layer for the STM32 MCUs"
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.3"
# Peripheral Access Crates
stm32f3 = { version = "0.13.2", optional = true }
stm32f4 = { version = "0.13.0", optional = true }
#stm32l4 = { version = "0.14.0", optional = true }
# We use custom patches for L4 and WB due to errors not yet fixed in the `stm32-rs`
# Github and/or crates.io release.
# Using local version of l4 instead of our crate, due to cortex-m-rt compatibility
#stm32l4 = { package = "stm32l4-stm32hal", path = "../../Desktop/stm32-rs/stm32l4", optional = true }
stm32l4 = { package = "stm32l4-stm32hal", version = "0.13.1", 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 }
# cortex-m-rt compatibility issue for h7
#stm32h7 = { path = "../../Desktop/stm32-rs/stm32h7", optional = true }
stm32wb = { package = "stm32wb-stm32hal", version = "0.13.1", optional = true }
#stm32wb = { version = "0.14.0", optional = true }
#stm32wb = { path = "../../Desktop/stm32-rs/stm32wb", optional = true }
stm32wl = { version = "0.13.0", optional = true }
# todo: Custom WL depending on merging of apt PR.
#stm32wl = { git = "https://github.com/munin-space/stm32-rs", branch = "master", optional = true }
# Embedded traits. Featured-gated with `embedded-hal`.
embedded-hal = { version = "0.2.5", features = ["unproven"], optional = true }
# nb is a non-blocking abstraction, eg for reading or writing one word at a time.
# It's mainly for embedded-hal, and a few of our APIs that mimick it.
nb = "1.0.0"
# Chrono allows for basic time and date functionality, for use with the Rtc.
chrono = { version = "0.4.19", default-features = false }
# `bit_field`, `stm32-device-signature`, `heapless`, `bitflags`, `bbqueue`, and
# `bluetooth-hci` are used for wb_only.
bit_field = { version = "0.10.1", optional = true }
stm32-device-signature = { version = "0.3.3", features = ["stm32wb5x"], optional = true }
heapless = { version = "0.5.3", optional = true} # todo: For compatibility with the stm32wb code we're using for now.
bluetooth-hci = { version = "0.1.0", optional = true}
byteorder = { version = "1.4.3", optional = true, default-features = false }
bitflags = { version = "1.2.1", optional = true}
bbqueue = { version = "0.4.8", optional = true}
# These USB and CAN crates are only imported if one of the `can`, `usb`, `usbotg_fs`, or `usbotg_hs`
# features are used.
stm32-usbd = { version = "0.6.0", optional = true }
synopsys-usb-otg = { version = "0.2.4", optional = true }
bxcan = { version = "0.5.0", optional = true }
# Misc features
cast = { version = "0.2.2", default-features = false }
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
[package.metadata.docs.rs]
features = ["l4x3", "l4rt", "can", "usb", "embedded-hal"]
targets = ["thumbv7em-none-eabihf"]
# For bright "supported by crate feature only" text on `embedded-hal`?
rustdoc-args = ["--cfg", "docsrs"]
# 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"]
wbrt = ["stm32wb/rt"]
wlrt = ["stm32wl/rt"]
# Features defined here are those taken from the SVD-generated STM32 PACs.
# The "f3" etc designator at the end lets us group by family when feature-gating.
# [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"]
# L412 is the same as L4x2, but with an RTC like in G0, G4 and L5.
l412 = ["stm32l4/stm32l412", "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"]
# [WB](https://docs.rs/crate/stm32wb/0.13.0/source/Cargo.toml)
wb55 = ["stm32wb/stm32wb55", "wb"]
# [WB](https://docs.rs/crate/stm32wl/0.13.0/source/Cargo.toml)
wle5 = ["stm32wl/stm32wle5", "wl"]
usb = ["stm32-usbd"]
usbotg_fs = ["synopsys-usb-otg/fs"]
usbotg_hs = ["synopsys-usb-otg/hs"]
can = ["bxcan"]
embedded_hal = ["embedded-hal"]
# These features are used to featured gate sections of code that apply
# to an entire family.
f3 = []
f4 = []
l4 = []
l5 = []
g0 = []
g4 = []
h7 = []
wb = ["bit_field", "stm32-device-signature", "heapless", "bluetooth-hci", "byteorder", "bitflags", "bbqueue"]
wl = []
# todo: w feature to combine wb and wl since they often have feature parity?