Skip to content

Commit 7dd5ba5

Browse files
authored
Merge pull request #19 from jamessizeland/update-trouble-dependency
update example
2 parents fc7a43c + d9788ba commit 7dd5ba5

File tree

10 files changed

+219
-137
lines changed

10 files changed

+219
-137
lines changed

Cargo.toml

+34-16
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,58 @@
11
[package]
22
name = "microbit-bsp"
3-
version = "0.4.1"
3+
version = "0.5.0"
44
edition = "2021"
55
description = "An embassy-based boards support package (BSP) for BBC Micro:bit v2"
66
license = "MIT OR Apache-2.0"
77
keywords = ["embedded", "async", "nordic", "nrf", "microbit"]
88
categories = ["embedded", "hardware-support", "no-std", "asynchronous"]
99
repository = "https://github.com/lulf/microbit-bsp"
10+
rust-version = "1.83"
1011

1112

1213
[dependencies]
13-
embassy-nrf = { version = "0.2.0", features = ["nrf52833","gpiote","time-driver-rtc1","nfc-pins-as-gpio","time"] }
14-
embassy-time = { version = "0.3", default-features = false }
15-
embassy-sync = { version = "0.6", default-features = false }
16-
cortex-m = "0.7"
14+
embassy-nrf = { version = "0.3", default-features = false, features = [
15+
"gpiote",
16+
"nfc-pins-as-gpio",
17+
"nrf52833",
18+
"time-driver-rtc1",
19+
] }
20+
embassy-time = { version = "0.4", default-features = false }
21+
embassy-sync = { version = "0.6.2" }
22+
cortex-m = { version = "0.7.6" }
1723
embedded-hal = "1.0"
1824
lsm303agr = "1.1.0"
1925
futures = { version = "0.3", default-features = false }
26+
2027
defmt = { version = "0.3", optional = true }
2128
heapless = "0.8.0"
2229

2330
# trouble bluetooth dependencies
2431
nrf-sdc = { git = "https://github.com/alexmoon/nrf-sdc.git", default-features = false, features = [
25-
"defmt",
26-
"peripheral",
27-
"central",
28-
"nrf52833"
29-
], rev = "3702af909d31cd81c62f15e1aa9d5f637ec935fa", optional = true}
30-
nrf-mpsl = { git = "https://github.com/alexmoon/nrf-sdc.git", default-features = false, features = [
31-
"defmt",
32-
"critical-section-impl"
33-
], rev = "3702af909d31cd81c62f15e1aa9d5f637ec935fa", optional = true }
32+
"defmt",
33+
"peripheral",
34+
"nrf52833",
35+
], rev = "551a95436e999b4290b4a33383aa3d6747b63dd9", optional = true }
36+
nrf-mpsl = { git = "https://github.com/alexmoon/nrf-sdc.git", default-features = false, features = [
37+
"defmt",
38+
"critical-section-impl",
39+
], rev = "551a95436e999b4290b4a33383aa3d6747b63dd9", optional = true }
3440
static_cell = { version = "2", optional = true }
3541

3642

3743
[features]
3844
default = ["defmt"]
39-
defmt = ["dep:defmt", "embassy-nrf/defmt", "heapless/defmt-03"]
40-
trouble = ["embassy-nrf/unstable-pac", "embassy-nrf/rt", "nrf-sdc", "nrf-mpsl", "static_cell"]
45+
defmt = [
46+
"dep:defmt",
47+
"embassy-nrf/defmt",
48+
"heapless/defmt-03",
49+
"embassy-time/defmt",
50+
"embassy-time/defmt-timestamp-uptime",
51+
]
52+
trouble = [
53+
"embassy-nrf/unstable-pac",
54+
"embassy-nrf/rt",
55+
"nrf-sdc",
56+
"nrf-mpsl",
57+
"static_cell",
58+
]

examples/accelerometer/Cargo.toml

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ edition = "2021"
77
microbit-bsp = { path = "../../" }
88

99
embassy-futures = { version = "0.1", default-features = false }
10-
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "task-arena-size-32768"] }
11-
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
10+
embassy-executor = { version = "0.7", default-features = false, features = [
11+
"arch-cortex-m",
12+
"defmt",
13+
"executor-interrupt",
14+
"executor-thread",
15+
"task-arena-size-32768"
16+
] }
17+
embassy-time = { version = "0.4", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
1218

1319
cortex-m-rt = "0.7"
1420

1521
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
16-
defmt = "0.3"
22+
defmt = "0.3.10"
1723
defmt-rtt = "0.4"
1824
panic-probe = { version = "0.3", features = ["print-defmt"] }
1925

examples/accelerometer/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async fn main(_s: Spawner) {
2323
// Bind interrupt to the TWI/SPI peripheral.
2424
bind_interrupts!(
2525
struct InterruptRequests {
26-
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 => InterruptHandler<TWISPI0>;
26+
TWISPI0 => InterruptHandler<TWISPI0>;
2727
}
2828
);
2929

examples/ble/Cargo.toml

+9-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@ edition = "2021"
77
microbit-bsp = { path = "../../" }
88

99
embassy-futures = { version = "0.1", default-features = false }
10-
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "task-arena-size-32768"] }
11-
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime"] }
10+
embassy-executor = { version = "0.7", default-features = false, features = [
11+
"arch-cortex-m",
12+
"defmt",
13+
"executor-thread",
14+
"task-arena-size-32768"
15+
] }
16+
embassy-time = { version = "0.4", default-features = false, features = ["defmt-timestamp-uptime"] }
1217

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

1621
heapless = "0.8"
1722
cortex-m-rt = "0.7"
1823
static_cell = "2"
1924

20-
defmt = "0.3"
25+
defmt = "0.3.10"
2126
defmt-rtt = "0.4"
2227
panic-probe = { version = "0.3", features = ["print-defmt"] }
2328

examples/display/Cargo.toml

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ edition = "2021"
77
microbit-bsp = { path = "../../" }
88

99
embassy-futures = { version = "0.1", default-features = false }
10-
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "task-arena-size-32768"] }
11-
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
10+
embassy-executor = { version = "0.7.0", default-features = false, features = [
11+
"arch-cortex-m",
12+
"defmt",
13+
"executor-interrupt",
14+
"executor-thread",
15+
"task-arena-size-32768"
16+
] }
17+
embassy-time = { version = "0.4.0", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
1218

1319
cortex-m-rt = "0.7"
1420

1521
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
16-
defmt = "0.3"
22+
defmt = "0.3.10"
1723
defmt-rtt = "0.4"
1824
panic-probe = { version = "0.3", features = ["print-defmt"] }
1925

examples/speaker/Cargo.toml

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ edition = "2021"
77
microbit-bsp = { path = "../../" }
88

99
embassy-futures = { version = "0.1", default-features = false }
10-
embassy-executor = { version = "0.6", default-features = false, features = ["integrated-timers", "defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "task-arena-size-32768"] }
11-
embassy-time = { version = "0.3", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
10+
embassy-executor = { version = "0.7", default-features = false, features = [
11+
"arch-cortex-m",
12+
"defmt",
13+
"executor-interrupt",
14+
"executor-thread",
15+
"task-arena-size-32768"
16+
] }
17+
embassy-time = { version = "0.4", default-features = false, features = ["defmt-timestamp-uptime", "defmt"] }
1218

1319
cortex-m-rt = "0.7"
1420

1521
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
16-
defmt = "0.3"
22+
defmt = "0.3.10"
1723
defmt-rtt = "0.4"
1824
panic-probe = { version = "0.3", features = ["print-defmt"] }
1925

examples/trouble/Cargo.toml

+12-7
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@ edition = "2021"
55
resolver = "2"
66

77
[dependencies]
8-
embassy-executor = { version = "0.6", default-features = false, features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers", "executor-interrupt", "task-arena-size-32768"] }
9-
embassy-time = { version = "0.3", default-features = false, features = ["defmt", "defmt-timestamp-uptime"] }
10-
microbit-bsp = { path = "../../", features = ["trouble"]}
8+
embassy-executor = { version = "0.7", default-features = false, features = [
9+
"arch-cortex-m",
10+
"defmt",
11+
"executor-interrupt",
12+
"executor-thread",
13+
"task-arena-size-32768"
14+
] }
15+
embassy-time = { version = "0.4", default-features = false, features = ["defmt", "defmt-timestamp-uptime"] }
1116
embassy-futures = "0.1.1"
12-
embassy-sync = { version = "0.6", features = ["defmt"] }
17+
embassy-sync = { version = "0.6.2", features = ["defmt"] }
18+
microbit-bsp = { path = "../../", features = ["trouble"]}
1319

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

20-
defmt = "0.3"
25+
defmt = "0.3.10"
2126
defmt-rtt = "0.4.0"
2227

2328
cortex-m = { version = "0.7.6" }

0 commit comments

Comments
 (0)