Skip to content

Commit

Permalink
Cleanup Cargo.tomls, fix async SPI example
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeaurivage committed Feb 27, 2023
1 parent 67c5a14 commit 2896640
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 33 deletions.
3 changes: 2 additions & 1 deletion boards/feather_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ optional = true
version = "0.2.1-git"
optional = true
git = "https://github.com/datdenkikniet/cortex-m-interrupt.git"
rev = "9baa936"

[dev-dependencies]
cortex-m-rtic = "1.1.3"
Expand Down Expand Up @@ -152,7 +153,7 @@ required-features = ["dma"]

[[example]]
name = "async_dmac"
required-features = ["atsamd-hal/async", "atsamd-hal/rtic", "cortex-m-interrupt"]
required-features = ["dma", "atsamd-hal/async", "atsamd-hal/rtic", "cortex-m-interrupt"]

[[example]]
name = "async_timer"
Expand Down
3 changes: 1 addition & 2 deletions boards/feather_m0/examples/async_spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ mod app {
miso,
)
.into_future(sercom4_irq)
.with_rx_dma_channel(channel0)
.with_tx_dma_channel(channel1);
.with_dma_channels(channel0, channel1);

async_task::spawn().ok();

Expand Down
36 changes: 6 additions & 30 deletions hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ void = {version = "1.0", default-features = false}
# Optional depdendencies
#===============================================================================

cortex-m-interrupt = {version = "0.2.1-git", git = "https://github.com/datdenkikniet/cortex-m-interrupt.git", rev = "9baa936", optional = true}
defmt = { version = "0.3", optional = true}
embassy-sync = {version = "0.1", optional = true}
embedded-hal-alpha = {package = "embedded-hal", version = "1.0.0-alpha.9"}
embedded-hal-async = {version = "0.2.0-alpha.0", optional = true}
embedded-sdmmc = {version = "0.3", optional = true}
fugit = {version = "0.3", optional = true}
futures = {version = "0.3", default-features = false, features = ["async-await"], optional = true}
jlink_rtt = {version = "0.2", optional = true}
rtic-monotonic = {version = "1.0", optional = true}
usb-device = {version = "0.2", optional = true}
Expand Down Expand Up @@ -90,37 +96,8 @@ atsame53n = {version = "0.12.0", path = "../pac/atsame53n", optional = true}
atsame54n = {version = "0.12.0", path = "../pac/atsame54n", optional = true}
atsame54p = {version = "0.12.0", path = "../pac/atsame54p", optional = true}

[dependencies.defmt]
version = "0.3"
optional = true

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

[dependencies.embedded-hal-alpha]
package = "embedded-hal"
version = "1.0.0-alpha.9"

[dependencies.critical-section]
version = "0.2.7"
optional = true

[dependencies.embassy-sync]
version = "0.1"
optional = true
git = "https://github.com/embassy-rs/embassy.git"

[dependencies.futures]
version = "0.3"
default-features = false
features = ["async-await"]
optional = true

[dependencies.cortex-m-interrupt]
version = "0.2.1-git"
git = "https://github.com/jbeaurivage/cortex-m-interrupt.git"
optional = true

#===============================================================================
# Features
Expand Down Expand Up @@ -217,7 +194,6 @@ usb = ["usb-device"]
use_rtt = ["jlink_rtt"]
async = [
"cortex-m-interrupt",
"critical-section",
"unproven",
"embassy-sync",
"futures",
Expand Down

0 comments on commit 2896640

Please sign in to comment.