Skip to content

Commit 2896640

Browse files
committed
Cleanup Cargo.tomls, fix async SPI example
1 parent 67c5a14 commit 2896640

File tree

3 files changed

+9
-33
lines changed

3 files changed

+9
-33
lines changed

boards/feather_m0/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ optional = true
3636
version = "0.2.1-git"
3737
optional = true
3838
git = "https://github.com/datdenkikniet/cortex-m-interrupt.git"
39+
rev = "9baa936"
3940

4041
[dev-dependencies]
4142
cortex-m-rtic = "1.1.3"
@@ -152,7 +153,7 @@ required-features = ["dma"]
152153

153154
[[example]]
154155
name = "async_dmac"
155-
required-features = ["atsamd-hal/async", "atsamd-hal/rtic", "cortex-m-interrupt"]
156+
required-features = ["dma", "atsamd-hal/async", "atsamd-hal/rtic", "cortex-m-interrupt"]
156157

157158
[[example]]
158159
name = "async_timer"

boards/feather_m0/examples/async_spi.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ mod app {
9191
miso,
9292
)
9393
.into_future(sercom4_irq)
94-
.with_rx_dma_channel(channel0)
95-
.with_tx_dma_channel(channel1);
94+
.with_dma_channels(channel0, channel1);
9695

9796
async_task::spawn().ok();
9897

hal/Cargo.toml

+6-30
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ void = {version = "1.0", default-features = false}
5252
# Optional depdendencies
5353
#===============================================================================
5454

55+
cortex-m-interrupt = {version = "0.2.1-git", git = "https://github.com/datdenkikniet/cortex-m-interrupt.git", rev = "9baa936", optional = true}
56+
defmt = { version = "0.3", optional = true}
57+
embassy-sync = {version = "0.1", optional = true}
58+
embedded-hal-alpha = {package = "embedded-hal", version = "1.0.0-alpha.9"}
59+
embedded-hal-async = {version = "0.2.0-alpha.0", optional = true}
5560
embedded-sdmmc = {version = "0.3", optional = true}
5661
fugit = {version = "0.3", optional = true}
62+
futures = {version = "0.3", default-features = false, features = ["async-await"], optional = true}
5763
jlink_rtt = {version = "0.2", optional = true}
5864
rtic-monotonic = {version = "1.0", optional = true}
5965
usb-device = {version = "0.2", optional = true}
@@ -90,37 +96,8 @@ atsame53n = {version = "0.12.0", path = "../pac/atsame53n", optional = true}
9096
atsame54n = {version = "0.12.0", path = "../pac/atsame54n", optional = true}
9197
atsame54p = {version = "0.12.0", path = "../pac/atsame54p", optional = true}
9298

93-
[dependencies.defmt]
94-
version = "0.3"
95-
optional = true
9699

97-
[dependencies.embedded-hal-async]
98-
version = "0.2.0-alpha.0"
99-
optional = true
100100

101-
[dependencies.embedded-hal-alpha]
102-
package = "embedded-hal"
103-
version = "1.0.0-alpha.9"
104-
105-
[dependencies.critical-section]
106-
version = "0.2.7"
107-
optional = true
108-
109-
[dependencies.embassy-sync]
110-
version = "0.1"
111-
optional = true
112-
git = "https://github.com/embassy-rs/embassy.git"
113-
114-
[dependencies.futures]
115-
version = "0.3"
116-
default-features = false
117-
features = ["async-await"]
118-
optional = true
119-
120-
[dependencies.cortex-m-interrupt]
121-
version = "0.2.1-git"
122-
git = "https://github.com/jbeaurivage/cortex-m-interrupt.git"
123-
optional = true
124101

125102
#===============================================================================
126103
# Features
@@ -217,7 +194,6 @@ usb = ["usb-device"]
217194
use_rtt = ["jlink_rtt"]
218195
async = [
219196
"cortex-m-interrupt",
220-
"critical-section",
221197
"unproven",
222198
"embassy-sync",
223199
"futures",

0 commit comments

Comments
 (0)