Skip to content

Commit 7798956

Browse files
committed
Update to esp-hal from GIT
1 parent 0bfc15b commit 7798956

File tree

11 files changed

+695
-376
lines changed

11 files changed

+695
-376
lines changed

examples/esp/Cargo.lock

Lines changed: 271 additions & 132 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/esp/Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resolver = "2"
77
categories = ["embedded", "hardware-support"]
88
keywords = ["thread", "openthread", "embedded", "embassy"]
99
description = "openthread examples for Espressif chips"
10-
repository = "https://github.com/ivmarkov/esp-openthread"
10+
repository = "https://github.com/esp-rs/openthread"
1111
license = "MIT OR Apache-2.0"
1212
readme = "README.md"
1313
rust-version = "1.84"
@@ -27,29 +27,29 @@ overflow-checks = false
2727

2828
[features]
2929
default = ["esp32c6"]
30-
esp32c6 = [ "esp-hal-embassy/esp32c6", "esp-ieee802154/esp32c6", "esp-backtrace/esp32c6", "esp-println/esp32c6", "esp-bootloader-esp-idf/esp32c6"]
31-
esp32h2 = [ "esp-hal-embassy/esp32h2", "esp-ieee802154/esp32h2", "esp-backtrace/esp32h2", "esp-println/esp32h2", "esp-bootloader-esp-idf/esp32h2"]
30+
esp32c6 = [ "esp-hal-embassy/esp32c6", "esp-radio/esp32c6", "esp-backtrace/esp32c6", "esp-println/esp32c6", "esp-bootloader-esp-idf/esp32c6"]
31+
esp32h2 = [ "esp-hal-embassy/esp32h2", "esp-radio/esp32h2", "esp-backtrace/esp32h2", "esp-println/esp32h2", "esp-bootloader-esp-idf/esp32h2"]
3232

3333
[dependencies]
34-
embassy-executor = { version = "0.7", features = ["task-arena-size-32768", "log"] }
34+
embassy-executor = "0.9"
3535
embassy-sync = "0.7"
3636
embassy-futures = "0.1"
37-
embassy-time = "0.4"
38-
embassy-net = { version = "0.6", features = ["proto-ipv6", "medium-ip", "udp", "log"] }
39-
esp-hal = { version = "=1.0.0-rc.0", features = ["log-04","unstable"] }
40-
esp-hal-embassy = "0.9"
41-
esp-alloc = { version = "0.8", optional = true }
42-
esp-backtrace = { version = "0.17", features = ["panic-handler", "exception-handler", "println"] }
43-
esp-println = { version = "0.15", features = ["log-04"] }
44-
esp-ieee802154 = { version= "0.8", features = ["log-04"] }
45-
esp-bootloader-esp-idf = { version = "0.2", features = ["log-04"] }
37+
embassy-time = "0.5"
38+
embassy-net = { version = "0.7", features = ["proto-ipv6", "medium-ip", "udp", "log"] }
39+
esp-hal = { version = "=1.0.0-rc.0", features = ["log-04", "unstable", "exception-handler"], git = "https://github.com/esp-rs/esp-hal" }
40+
esp-hal-embassy = { version = "0.9", git = "https://github.com/esp-rs/esp-hal" }
41+
esp-alloc = { version = "0.8", optional = true, git = "https://github.com/esp-rs/esp-hal" }
42+
esp-backtrace = { version = "0.17", features = ["panic-handler", "println"], git = "https://github.com/esp-rs/esp-hal" }
43+
esp-println = { version = "0.15", features = ["log-04"], git = "https://github.com/esp-rs/esp-hal" }
44+
esp-radio = { version = "0.15", features = ["unstable", "ieee802154"], git = "https://github.com/esp-rs/esp-hal" }
45+
esp-bootloader-esp-idf = { version = "0.2", features = ["log-04"], git = "https://github.com/esp-rs/esp-hal" }
4646
log = "0.4"
4747
heapless = "0.8"
4848
critical-section = "1.2"
4949
rand_core = "0.9"
5050
static_cell = "2.1"
5151

52-
openthread = { path = "../../openthread", features = ["udp", "srp", "embassy-net-driver-channel", "esp-ieee802154", "isupper", "log"] }
52+
openthread = { path = "../../openthread", features = ["udp", "srp", "embassy-net-driver-channel", "esp-radio", "isupper", "log"] }
5353
tinyrlibc = { version = "0.5", default-features = false, features = ["utoa", "strtoul"] }
5454

5555
[[bin]]

examples/esp/src/bin/basic_enet.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use embassy_net::{Config, ConfigV6, Ipv6Cidr, Runner, StackResources, StaticConf
1818

1919
use esp_hal::rng::Rng;
2020
use esp_hal::timer::systimer::SystemTimer;
21-
use esp_ieee802154::Ieee802154;
21+
use esp_radio::ieee802154::Ieee802154;
2222
use {esp_backtrace as _, esp_println as _};
2323

2424
use heapless::Vec;
@@ -69,7 +69,8 @@ async fn main(spawner: Spawner) {
6969

7070
esp_hal_embassy::init(SystemTimer::new(peripherals.SYSTIMER).alarm0);
7171

72-
let rng = mk_static!(Rng, Rng::new(peripherals.RNG));
72+
// TODO: Use TRNG?
73+
let rng = mk_static!(Rng, Rng::new());
7374

7475
let enet_seed = rng.next_u64();
7576

examples/esp/src/bin/basic_udp.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use embassy_executor::Spawner;
1616

1717
use esp_hal::rng::Rng;
1818
use esp_hal::timer::systimer::SystemTimer;
19-
use esp_ieee802154::Ieee802154;
19+
use esp_radio::ieee802154::Ieee802154;
2020
use {esp_backtrace as _, esp_println as _};
2121

2222
use openthread::esp::EspRadio;
@@ -64,7 +64,8 @@ async fn main(spawner: Spawner) {
6464

6565
esp_hal_embassy::init(SystemTimer::new(peripherals.SYSTIMER).alarm0);
6666

67-
let rng = mk_static!(Rng, Rng::new(peripherals.RNG));
67+
// TODO: Use TRNG?
68+
let rng = mk_static!(Rng, Rng::new());
6869

6970
let mut ieee_eui64 = [0; 8];
7071
rng.fill_bytes(&mut ieee_eui64);

examples/esp/src/bin/srp.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use embassy_executor::Spawner;
2020

2121
use esp_hal::rng::Rng;
2222
use esp_hal::timer::systimer::SystemTimer;
23-
use esp_ieee802154::Ieee802154;
23+
use esp_radio::ieee802154::Ieee802154;
2424
use {esp_backtrace as _, esp_println as _};
2525

2626
use openthread::esp::EspRadio;
@@ -72,7 +72,8 @@ async fn main(spawner: Spawner) {
7272

7373
esp_hal_embassy::init(SystemTimer::new(peripherals.SYSTIMER).alarm0);
7474

75-
let rng = mk_static!(Rng, Rng::new(peripherals.RNG));
75+
// TODO: Use TRNG?
76+
let rng = mk_static!(Rng, Rng::new());
7677

7778
let mut ieee_eui64 = [0; 8];
7879
rng.fill_bytes(&mut ieee_eui64);

0 commit comments

Comments
 (0)