Skip to content

Commit

Permalink
Merge pull request #19 from jamessizeland/update-trouble-dependency
Browse files Browse the repository at this point in the history
update example
  • Loading branch information
lulf authored Jan 24, 2025
2 parents fc7a43c + d9788ba commit 7dd5ba5
Show file tree
Hide file tree
Showing 10 changed files with 219 additions and 137 deletions.
50 changes: 34 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,58 @@
[package]
name = "microbit-bsp"
version = "0.4.1"
version = "0.5.0"
edition = "2021"
description = "An embassy-based boards support package (BSP) for BBC Micro:bit v2"
license = "MIT OR Apache-2.0"
keywords = ["embedded", "async", "nordic", "nrf", "microbit"]
categories = ["embedded", "hardware-support", "no-std", "asynchronous"]
repository = "https://github.com/lulf/microbit-bsp"
rust-version = "1.83"


[dependencies]
embassy-nrf = { version = "0.2.0", features = ["nrf52833","gpiote","time-driver-rtc1","nfc-pins-as-gpio","time"] }
embassy-time = { version = "0.3", default-features = false }
embassy-sync = { version = "0.6", default-features = false }
cortex-m = "0.7"
embassy-nrf = { version = "0.3", default-features = false, features = [
"gpiote",
"nfc-pins-as-gpio",
"nrf52833",
"time-driver-rtc1",
] }
embassy-time = { version = "0.4", default-features = false }
embassy-sync = { version = "0.6.2" }
cortex-m = { version = "0.7.6" }
embedded-hal = "1.0"
lsm303agr = "1.1.0"
futures = { version = "0.3", default-features = false }

defmt = { version = "0.3", optional = true }
heapless = "0.8.0"

# trouble bluetooth dependencies
nrf-sdc = { git = "https://github.com/alexmoon/nrf-sdc.git", default-features = false, features = [
"defmt",
"peripheral",
"central",
"nrf52833"
], rev = "3702af909d31cd81c62f15e1aa9d5f637ec935fa", optional = true}
nrf-mpsl = { git = "https://github.com/alexmoon/nrf-sdc.git", default-features = false, features = [
"defmt",
"critical-section-impl"
], rev = "3702af909d31cd81c62f15e1aa9d5f637ec935fa", optional = true }
"defmt",
"peripheral",
"nrf52833",
], rev = "551a95436e999b4290b4a33383aa3d6747b63dd9", optional = true }
nrf-mpsl = { git = "https://github.com/alexmoon/nrf-sdc.git", default-features = false, features = [
"defmt",
"critical-section-impl",
], rev = "551a95436e999b4290b4a33383aa3d6747b63dd9", optional = true }
static_cell = { version = "2", optional = true }


[features]
default = ["defmt"]
defmt = ["dep:defmt", "embassy-nrf/defmt", "heapless/defmt-03"]
trouble = ["embassy-nrf/unstable-pac", "embassy-nrf/rt", "nrf-sdc", "nrf-mpsl", "static_cell"]
defmt = [
"dep:defmt",
"embassy-nrf/defmt",
"heapless/defmt-03",
"embassy-time/defmt",
"embassy-time/defmt-timestamp-uptime",
]
trouble = [
"embassy-nrf/unstable-pac",
"embassy-nrf/rt",
"nrf-sdc",
"nrf-mpsl",
"static_cell",
]
12 changes: 9 additions & 3 deletions examples/accelerometer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ edition = "2021"
microbit-bsp = { path = "../../" }

embassy-futures = { version = "0.1", default-features = false }
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "task-arena-size-32768"] }
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
embassy-executor = { version = "0.7", default-features = false, features = [
"arch-cortex-m",
"defmt",
"executor-interrupt",
"executor-thread",
"task-arena-size-32768"
] }
embassy-time = { version = "0.4", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }

cortex-m-rt = "0.7"

cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
defmt = "0.3"
defmt = "0.3.10"
defmt-rtt = "0.4"
panic-probe = { version = "0.3", features = ["print-defmt"] }

Expand Down
2 changes: 1 addition & 1 deletion examples/accelerometer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async fn main(_s: Spawner) {
// Bind interrupt to the TWI/SPI peripheral.
bind_interrupts!(
struct InterruptRequests {
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 => InterruptHandler<TWISPI0>;
TWISPI0 => InterruptHandler<TWISPI0>;
}
);

Expand Down
13 changes: 9 additions & 4 deletions examples/ble/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ edition = "2021"
microbit-bsp = { path = "../../" }

embassy-futures = { version = "0.1", default-features = false }
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "task-arena-size-32768"] }
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime"] }
embassy-executor = { version = "0.7", default-features = false, features = [
"arch-cortex-m",
"defmt",
"executor-thread",
"task-arena-size-32768"
] }
embassy-time = { version = "0.4", default-features = false, features = ["defmt-timestamp-uptime"] }

nrf-softdevice = { version = "0.1.0", features = ["ble-peripheral", "ble-gatt-server", "s113", "nrf52833", "critical-section-impl", "defmt"] }
nrf-softdevice-s113 = { version = "0.1.0" }
nrf-softdevice-s113 = { version = "0.1.2" }

heapless = "0.8"
cortex-m-rt = "0.7"
static_cell = "2"

defmt = "0.3"
defmt = "0.3.10"
defmt-rtt = "0.4"
panic-probe = { version = "0.3", features = ["print-defmt"] }

Expand Down
12 changes: 9 additions & 3 deletions examples/display/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ edition = "2021"
microbit-bsp = { path = "../../" }

embassy-futures = { version = "0.1", default-features = false }
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "task-arena-size-32768"] }
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
embassy-executor = { version = "0.7.0", default-features = false, features = [
"arch-cortex-m",
"defmt",
"executor-interrupt",
"executor-thread",
"task-arena-size-32768"
] }
embassy-time = { version = "0.4.0", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }

cortex-m-rt = "0.7"

cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
defmt = "0.3"
defmt = "0.3.10"
defmt-rtt = "0.4"
panic-probe = { version = "0.3", features = ["print-defmt"] }

Expand Down
12 changes: 9 additions & 3 deletions examples/speaker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ edition = "2021"
microbit-bsp = { path = "../../" }

embassy-futures = { version = "0.1", default-features = false }
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "task-arena-size-32768"] }
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
embassy-executor = { version = "0.7", default-features = false, features = [
"arch-cortex-m",
"defmt",
"executor-interrupt",
"executor-thread",
"task-arena-size-32768"
] }
embassy-time = { version = "0.4", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }

cortex-m-rt = "0.7"

cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
defmt = "0.3"
defmt = "0.3.10"
defmt-rtt = "0.4"
panic-probe = { version = "0.3", features = ["print-defmt"] }

Expand Down
19 changes: 12 additions & 7 deletions examples/trouble/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@ edition = "2021"
resolver = "2"

[dependencies]
embassy-executor = { version = "0.6", default-features = false, features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers", "executor-interrupt", "task-arena-size-32768"] }
embassy-time = { version = "0.3", default-features = false, features = ["defmt", "defmt-timestamp-uptime"] }
microbit-bsp = { path = "../../", features = ["trouble"]}
embassy-executor = { version = "0.7", default-features = false, features = [
"arch-cortex-m",
"defmt",
"executor-interrupt",
"executor-thread",
"task-arena-size-32768"
] }
embassy-time = { version = "0.4", default-features = false, features = ["defmt", "defmt-timestamp-uptime"] }
embassy-futures = "0.1.1"
embassy-sync = { version = "0.6", features = ["defmt"] }
embassy-sync = { version = "0.6.2", features = ["defmt"] }
microbit-bsp = { path = "../../", features = ["trouble"]}

futures = { version = "0.3", default-features = false, features = ["async-await"]}
bt-hci = { version = "0.1.1", default-features = false, features = ["defmt"] }
trouble-host = { git = "https://github.com/embassy-rs/trouble.git", features = [
"defmt",
] }
], rev = "a1daee269deee25fbb6236cb599a8fb5919c02b7"}

defmt = "0.3"
defmt = "0.3.10"
defmt-rtt = "0.4.0"

cortex-m = { version = "0.7.6" }
Expand Down
Loading

0 comments on commit 7dd5ba5

Please sign in to comment.