forked from David-OConnor/stm32-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
202 lines (171 loc) · 6.73 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
189
190
191
192
193
194
195
196
197
198
199
200
201
[package]
name = "stm32-hal2"
version = "1.8.4"
edition = "2021"
authors = ["David O'Connor <the_alchemist@fastmail.com>"]
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"
exclude = [".gitignore"]
[dependencies]
cortex-m = "^0.7.7"
# Peripheral Access Crates
stm32f3 = { version = "0.15.1", optional = true }
stm32f4 = { version = "0.15.1", optional = true }
stm32l4 = { version = "0.15.1", optional = true }
stm32l5 = { version = "0.15.1", optional = true }
stm32g0 = { version = "0.15.1", optional = true }
stm32g4 = { version = "0.15.1", optional = true }
#stm32h5 = { version = "0.15.1", optional = true }
#stm32h5 = { path = "../../Desktop/h5_pac/stm32-rs/stm32h5", optional = true }
stm32h7 = { version = "0.15.1", optional = true }
stm32wb = { version = "0.15.1", optional = true }
stm32wl = { version = "0.15.1", optional = true }
defmt = "^0.3.4"
# Embedded-HAL traits and related libs. Featured-gated with `embedded-hal`.
embedded-hal = { version = "^1.0.0", features=["defmt-03"], optional = true }
# `nb` is only included when using the embedded-hal feature.
#nb = { version = "^1.1.0", optional = true }
#void = { version = "^1.0.2", default-features = false, optional = true }
#embedded-time = { version = "^0.12.1", optional = true }
# Enabled with the `monotonic` feature.
rtic-monotonic = { version = "^1.0.0", optional = true }
# Chrono allows for basic time and date functionality, for use with the RTC.
chrono = { version = "^0.4.23", default-features = false }
# These USB and CAN crates are only imported if one of the `can`, `usb`, `usbotg_fs`, or `usbotg_hs`
# features are used.
# Workaround using a fork of stm32-usbd until the main one is released on crates.
stm32-usbd = { package = "stm32-usbd2", version = "^0.7.0", optional = true }
#stm32-usbd = { version = "^0.7.0", optional = true }
synopsys-usb-otg = { version = "^0.3.2", features = ["cortex-m"], optional = true }
bxcan = { version = "^0.7.0", optional = true }
fdcan = { version = "^0.2.0", optional = true }
# TCP stack for use with the Ethernet peripheral.
smoltcp = { version = "^0.8.1", optional = true }
# Misc features
num-traits = { version = "^0.2.15", default-features = false, features = ["libm"] } # For sqrt in timers
# Meta-programming; mainly used for feature-gating
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 = ["h735", "h7rt", "usbotg_hs", "can_fd_h", "embedded_hal"]
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"]
#h5rt = ["stm32h5/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/latest/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/latest/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/latest/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/latest/source/Cargo.toml)
l552 = ["stm32l5/stm32l552", "l5"]
l562 = ["stm32l5/stm32l562", "l5"]
# [G0](https://docs.rs/crate/stm32g0/latest/source/Cargo.toml)
g030 = ["stm32g0/stm32g030", "g0"]
g031 = ["stm32g0/stm32g031", "g0"]
g041 = ["stm32g0/stm32g041", "g0"]
g050 = ["stm32g0/stm32g050", "g0"]
g051 = ["stm32g0/stm32g051", "g0"]
g061 = ["stm32g0/stm32g061", "g0"]
g070 = ["stm32g0/stm32g070", "g0"]
g071 = ["stm32g0/stm32g071", "g0"]
g081 = ["stm32g0/stm32g081", "g0"]
g0b0 = ["stm32g0/stm32g0b0", "g0"]
g0b1 = ["stm32g0/stm32g0b1", "g0"]
g0c1 = ["stm32g0/stm32g0c1", "g0"]
# [G4](https://docs.rs/crate/stm32g4/latest/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"]
#h503 = ["stm32h5/stm32h503", "h5"]
#h562 = ["stm32h5/stm32h562", "h5"]
#h563 = ["stm32h5/stm32h563", "h5"]
#h573 = ["stm32h5/stm32h573", "h5"]
# [H7](https://docs.rs/crate/stm32h7/latest/source/Cargo.toml)
h735 = ["stm32h7/stm32h735", "h7"]
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/latest/source/Cargo.toml)
wb55 = ["stm32wb/stm32wb55", "wb"]
# [WB](https://docs.rs/crate/stm32wl/latest/source/Cargo.toml)
wle5 = ["stm32wl/stm32wle5", "wl"]
usb = ["dep:stm32-usbd"]
usbotg_fs = ["synopsys-usb-otg/fs"] # eg F4 for FS.
usbotg_hs = ["synopsys-usb-otg/hs"] # eg H7 for HS.
can_bx = ["dep:bxcan"]
can_fd_g = ["fdcan/fdcan_g0_g4_l5"]
can_fd_h = ["fdcan/fdcan_h7"]
net = ["dep:smoltcp"]
#embedded_hal = ["dep:embedded-hal", "dep:nb", "dep:void", "dep:embedded-time"]
embedded_hal = ["dep:embedded-hal"]
monotonic = ["dep:rtic-monotonic"]
# These features are used to featured gate sections of code that apply
# to an entire family.
f3 = []
f4 = []
l4 = []
l5 = []
g0 = []
g4 = []
h5 = []
h7 = []
#wb = ["bit_field", "stm32-device-signature", "heapless", "byteorder", "bbqueue"]
wb = []
wl = []
#[package.metadata.docs.rs]
#features = ["h7rt", "h743v", "can_fd_h", "usbotg_hs"]
# todo: w feature to combine wb and wl since they often have feature parity?