forked from py32-rs/py32-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
127 lines (100 loc) · 4.65 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
[package]
name = "py32-hal"
version = "0.2.1"
edition = "2021"
authors = ["Decaday <[email protected]>", "Andelf <[email protected]>"]
repository = "https://github.com/py32-rs/py32-hal"
documentation = "https://docs.rs/py32-hal"
homepage = "https://github.com/py32-rs/py32-hal"
categories = ["embedded", "no-std", "hardware-support"]
description = "HAL and Embassy support for the Py32 family of microcontrollers"
keywords = ["py32", "hal", "embedded", "no-std", "hardware-support"]
readme = "README.md"
license = "MIT OR Apache-2.0"
[dependencies]
# py32-metapac = "0.2.1"
# py32-metapac = { path = "../py32-data/build/py32-metapac"}
py32-metapac = { git = "https://github.com/py32-rs/py32-metapac.git" }
cortex-m = { version = "0.7.7", features = [
"critical-section-single-core",
"critical-section",
] }
cortex-m-rt = "0.7.5"
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [
"unproven",
] }
embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
embedded-hal-async = { version = "1.0" }
embedded-hal-nb = { version = "1.0" }
embedded-can = "0.4"
embedded-io = { version = "0.6.0" }
embedded-io-async = { version = "0.6.1" }
nb = "1.0.0"
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.4", optional = true }
log = { version = "0.4", optional = true }
critical-section = "1.2"
cfg-if = "1.0.0"
portable-atomic = { version = "1", features = ["unsafe-assume-single-core", "require-cas"], optional = true }
# musb = { version = "0.2.0", optional = true, features = ["prebuild"] }
musb = { git = "https://github.com/decaday/musb.git", optional = true, features = ["prebuild"] }
# musb = { path = "../musb", optional = true , features = ["prebuild"] }
embassy-usb-driver = {version = "0.1.0", optional = true }
usb-device = {version = "0.3.2", optional = true }
futures-util = { version = "0.3.30", default-features = false }
embassy-hal-internal = { version = "0.2.0", features = [
"cortex-m",
"prio-bits-4",
] }
embassy-sync = { version = "0.6.0", optional = true }
embassy-futures = { version = "0.1.1", optional = true }
embassy-time-driver = { version = "0.1.0", optional = true }
embassy-time = { version = "0.3.2", optional = true }
embassy-executor = { version = "0.6", features = [
"nightly",
"integrated-timers",
"arch-cortex-m",
] }
embassy-embedded-hal = { version = "0.2.0", default-features = false }
embedded-storage = "0.3.1"
[build-dependencies]
# py32-metapac = { path = "../py32-data/build/py32-metapac", default-features = false, features = [
# py32-metapac = { version = "0.2.1", default-features = false, features = [
py32-metapac = { git = "https://github.com/py32-rs/py32-metapac.git", default-features = false, features = [
"metadata",
] }
proc-macro2 = "1.0.89"
quote = "1.0.37"
[dev-dependencies]
critical-section = { version = "1.1", features = ["std"] }
# cargo test --no-default-features --features "embassy time exti embassy-usb-driver-impl py32f072c1b"
[features]
default = ["rt", "memory-x", "defmt", "embassy", "time", "exti"]
rt = ["py32-metapac/rt"]
defmt = ["dep:defmt", "dep:defmt-rtt", "embassy-usb-driver/defmt", "musb?/defmt"]
memory-x = ["py32-metapac/memory-x"]
embassy = ["dep:embassy-sync", "dep:embassy-futures", "dep:embassy-time-driver"]
time = ["dep:embassy-time", "embassy-embedded-hal/time"]
exti = []
embassy-usb-driver-impl = ["dep:musb","dep:embassy-usb-driver", "musb/embassy-usb-driver-impl"]
usb-device-impl = ["dep:musb","dep:usb-device", "musb/usb-device-impl"]
py32f030k28 = ["py32-metapac/py32f030k28"]
py32f030f16 = ["py32-metapac/py32f030f16"]
py32f072c1b = ["py32-metapac/py32f072c1b", "dep:musb", "musb/builtin-py32f07x"]
# As of 2023-12-04, this driver is implemented using CC1 as the halfway rollover interrupt, and any
# additional CC capabilities to provide timer alarms to embassy-time. embassy-time requires AT LEAST
# one alarm to be allocatable, which means timers that only have CC1, such as TIM16/TIM17, are not
# candidates for use as an embassy-time driver provider. (a.k.a 1CH and 1CH_CMP are not, others are good.)
time-driver-any = ["_time-driver"]
time-driver-tim1 = ["_time-driver"]
time-driver-tim3 = ["_time-driver"]
time-driver-tim15 = ["_time-driver"]
time-driver-systick = ["portable-atomic"]
# td == time-driver, to avoid confliction
# By default, only one alarm is provided (similar to a 2-channel timer). Enabling this feature provides three alarms (similar to a 4-channel timer).
# Of course, this will also increase the execution time of the interrupt handler.
td-systick-multi-alarms = ["time-driver-systick"]
_time-driver = []
[package.metadata.docs.rs]
default-target = "thumbv6m-none-eabi"
features = ["py32f072c1b", "embassy-usb-driver-impl"]