aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h5
diff options
context:
space:
mode:
authorsodo <[email protected]>2024-01-02 01:37:00 +0900
committersodo <[email protected]>2024-01-02 13:34:22 +0900
commit6ee153a3e2eec284c0d9d87f31801265c0604f74 (patch)
tree8b801cbd15f9ad5052d5942c731e75736dc9d7eb /examples/stm32h5
parentb7cd7952c890f585ff876c622482534e5d58d4a4 (diff)
parent0be9b0599aaf2e425d76ec7852ff4b3535defddf (diff)
Merge remote-tracking branch 'origin'
Diffstat (limited to 'examples/stm32h5')
-rw-r--r--examples/stm32h5/Cargo.toml8
-rw-r--r--examples/stm32h5/src/bin/blinky.rs1
-rw-r--r--examples/stm32h5/src/bin/button_exti.rs1
-rw-r--r--examples/stm32h5/src/bin/eth.rs14
-rw-r--r--examples/stm32h5/src/bin/i2c.rs1
-rw-r--r--examples/stm32h5/src/bin/rng.rs1
-rw-r--r--examples/stm32h5/src/bin/usart.rs1
-rw-r--r--examples/stm32h5/src/bin/usart_dma.rs1
-rw-r--r--examples/stm32h5/src/bin/usart_split.rs1
-rw-r--r--examples/stm32h5/src/bin/usb_serial.rs1
10 files changed, 12 insertions, 18 deletions
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml
index 0ed0ce3c0..8815b8e47 100644
--- a/examples/stm32h5/Cargo.toml
+++ b/examples/stm32h5/Cargo.toml
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
8# Change stm32h563zi to your chip name, if necessary. 8# Change stm32h563zi to your chip name, if necessary.
9embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32h563zi", "memory-x", "time-driver-any", "exti", "unstable-pac"] } 9embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32h563zi", "memory-x", "time-driver-any", "exti", "unstable-pac"] }
10embassy-sync = { version = "0.5.0", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.5.0", path = "../../embassy-sync", features = ["defmt"] }
11embassy-executor = { version = "0.4.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.4.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 12embassy-time = { version = "0.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
13embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } 13embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] }
14embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } 14embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
@@ -19,8 +19,8 @@ defmt-rtt = "0.4"
19cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } 19cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
20cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
21embedded-hal = "0.2.6" 21embedded-hal = "0.2.6"
22embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } 22embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.3" }
23embedded-hal-async = { version = "=1.0.0-rc.2" } 23embedded-hal-async = { version = "=1.0.0-rc.3" }
24embedded-io-async = { version = "0.6.1" } 24embedded-io-async = { version = "0.6.1" }
25embedded-nal-async = { version = "0.7.1" } 25embedded-nal-async = { version = "0.7.1" }
26panic-probe = { version = "0.3", features = ["print-defmt"] } 26panic-probe = { version = "0.3", features = ["print-defmt"] }
@@ -31,7 +31,7 @@ critical-section = "1.1"
31micromath = "2.0.0" 31micromath = "2.0.0"
32stm32-fmc = "0.3.0" 32stm32-fmc = "0.3.0"
33embedded-storage = "0.3.1" 33embedded-storage = "0.3.1"
34static_cell = { version = "2", features = ["nightly"]} 34static_cell = "2"
35 35
36# cargo build/run 36# cargo build/run
37[profile.dev] 37[profile.dev]
diff --git a/examples/stm32h5/src/bin/blinky.rs b/examples/stm32h5/src/bin/blinky.rs
index 1394f03fa..f37e8b1d8 100644
--- a/examples/stm32h5/src/bin/blinky.rs
+++ b/examples/stm32h5/src/bin/blinky.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::*; 4use defmt::*;
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
diff --git a/examples/stm32h5/src/bin/button_exti.rs b/examples/stm32h5/src/bin/button_exti.rs
index dfe587d41..67751187d 100644
--- a/examples/stm32h5/src/bin/button_exti.rs
+++ b/examples/stm32h5/src/bin/button_exti.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::*; 4use defmt::*;
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
diff --git a/examples/stm32h5/src/bin/eth.rs b/examples/stm32h5/src/bin/eth.rs
index b2758cba0..2370656e6 100644
--- a/examples/stm32h5/src/bin/eth.rs
+++ b/examples/stm32h5/src/bin/eth.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::*; 4use defmt::*;
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
@@ -18,7 +17,7 @@ use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
18use embassy_time::Timer; 17use embassy_time::Timer;
19use embedded_io_async::Write; 18use embedded_io_async::Write;
20use rand_core::RngCore; 19use rand_core::RngCore;
21use static_cell::make_static; 20use static_cell::StaticCell;
22use {defmt_rtt as _, panic_probe as _}; 21use {defmt_rtt as _, panic_probe as _};
23 22
24bind_interrupts!(struct Irqs { 23bind_interrupts!(struct Irqs {
@@ -67,8 +66,9 @@ async fn main(spawner: Spawner) -> ! {
67 66
68 let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF]; 67 let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF];
69 68
69 static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new();
70 let device = Ethernet::new( 70 let device = Ethernet::new(
71 make_static!(PacketQueue::<4, 4>::new()), 71 PACKETS.init(PacketQueue::<4, 4>::new()),
72 p.ETH, 72 p.ETH,
73 Irqs, 73 Irqs,
74 p.PA1, 74 p.PA1,
@@ -92,11 +92,13 @@ async fn main(spawner: Spawner) -> ! {
92 //}); 92 //});
93 93
94 // Init network stack 94 // Init network stack
95 let stack = &*make_static!(Stack::new( 95 static STACK: StaticCell<Stack<Device>> = StaticCell::new();
96 static RESOURCES: StaticCell<StackResources<2>> = StaticCell::new();
97 let stack = &*STACK.init(Stack::new(
96 device, 98 device,
97 config, 99 config,
98 make_static!(StackResources::<2>::new()), 100 RESOURCES.init(StackResources::<2>::new()),
99 seed 101 seed,
100 )); 102 ));
101 103
102 // Launch network task 104 // Launch network task
diff --git a/examples/stm32h5/src/bin/i2c.rs b/examples/stm32h5/src/bin/i2c.rs
index 31783a2bf..31e83cbb5 100644
--- a/examples/stm32h5/src/bin/i2c.rs
+++ b/examples/stm32h5/src/bin/i2c.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::*; 4use defmt::*;
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
diff --git a/examples/stm32h5/src/bin/rng.rs b/examples/stm32h5/src/bin/rng.rs
index 7c8c50eca..9c0d704b5 100644
--- a/examples/stm32h5/src/bin/rng.rs
+++ b/examples/stm32h5/src/bin/rng.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::*; 4use defmt::*;
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
diff --git a/examples/stm32h5/src/bin/usart.rs b/examples/stm32h5/src/bin/usart.rs
index db04d4e55..f9cbad6af 100644
--- a/examples/stm32h5/src/bin/usart.rs
+++ b/examples/stm32h5/src/bin/usart.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use cortex_m_rt::entry; 4use cortex_m_rt::entry;
6use defmt::*; 5use defmt::*;
diff --git a/examples/stm32h5/src/bin/usart_dma.rs b/examples/stm32h5/src/bin/usart_dma.rs
index bafe50839..caae0dd18 100644
--- a/examples/stm32h5/src/bin/usart_dma.rs
+++ b/examples/stm32h5/src/bin/usart_dma.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use core::fmt::Write; 4use core::fmt::Write;
6 5
diff --git a/examples/stm32h5/src/bin/usart_split.rs b/examples/stm32h5/src/bin/usart_split.rs
index d9037c014..92047de8d 100644
--- a/examples/stm32h5/src/bin/usart_split.rs
+++ b/examples/stm32h5/src/bin/usart_split.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::*; 4use defmt::*;
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
diff --git a/examples/stm32h5/src/bin/usb_serial.rs b/examples/stm32h5/src/bin/usb_serial.rs
index 7d45818af..208493d8c 100644
--- a/examples/stm32h5/src/bin/usb_serial.rs
+++ b/examples/stm32h5/src/bin/usb_serial.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::{panic, *}; 4use defmt::{panic, *};
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;