diff options
Diffstat (limited to 'examples/stm32h7')
| -rw-r--r-- | examples/stm32h7/Cargo.toml | 3 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/camera.rs | 2 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/spi_dma.rs | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 67f1cfc94..16adcdb91 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -10,7 +10,7 @@ resolver = "2" | |||
| 10 | [dependencies] | 10 | [dependencies] |
| 11 | embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } | 11 | embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } |
| 12 | embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } | 12 | embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } |
| 13 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h743zi", "net", "time-driver-any", "exti", "unstable-pac"] } | 13 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h743zi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } |
| 14 | embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } | 14 | embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } |
| 15 | embassy-hal-common = { path = "../../embassy-hal-common", default-features = false, features = ["defmt"] } | 15 | embassy-hal-common = { path = "../../embassy-hal-common", default-features = false, features = ["defmt"] } |
| 16 | 16 | ||
| @@ -20,6 +20,7 @@ defmt-rtt = "0.3" | |||
| 20 | cortex-m = "0.7.3" | 20 | cortex-m = "0.7.3" |
| 21 | cortex-m-rt = "0.7.0" | 21 | cortex-m-rt = "0.7.0" |
| 22 | embedded-hal = "0.2.6" | 22 | embedded-hal = "0.2.6" |
| 23 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy"} | ||
| 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 24 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 25 | heapless = { version = "0.7.5", default-features = false } | 26 | heapless = { version = "0.7.5", default-features = false } |
diff --git a/examples/stm32h7/src/bin/camera.rs b/examples/stm32h7/src/bin/camera.rs index 9e8071bb3..9760d0f74 100644 --- a/examples/stm32h7/src/bin/camera.rs +++ b/examples/stm32h7/src/bin/camera.rs | |||
| @@ -128,7 +128,7 @@ mod ov7725 { | |||
| 128 | use defmt::Format; | 128 | use defmt::Format; |
| 129 | use embassy::time::{Duration, Timer}; | 129 | use embassy::time::{Duration, Timer}; |
| 130 | use embassy_stm32::rcc::{Mco, McoInstance}; | 130 | use embassy_stm32::rcc::{Mco, McoInstance}; |
| 131 | use embassy_traits::i2c::I2c; | 131 | use embedded_hal_async::i2c::I2c; |
| 132 | 132 | ||
| 133 | #[repr(u8)] | 133 | #[repr(u8)] |
| 134 | pub enum RgbFormat { | 134 | pub enum RgbFormat { |
diff --git a/examples/stm32h7/src/bin/spi_dma.rs b/examples/stm32h7/src/bin/spi_dma.rs index 192e2e864..15ae09973 100644 --- a/examples/stm32h7/src/bin/spi_dma.rs +++ b/examples/stm32h7/src/bin/spi_dma.rs | |||
| @@ -9,7 +9,6 @@ use core::fmt::Write; | |||
| 9 | use embassy::executor::Executor; | 9 | use embassy::executor::Executor; |
| 10 | use embassy::util::Forever; | 10 | use embassy::util::Forever; |
| 11 | use embassy_stm32::time::U32Ext; | 11 | use embassy_stm32::time::U32Ext; |
| 12 | use embassy_traits::spi::FullDuplex; | ||
| 13 | use example_common::*; | 12 | use example_common::*; |
| 14 | 13 | ||
| 15 | use core::str::from_utf8; | 14 | use core::str::from_utf8; |
| @@ -24,8 +23,8 @@ async fn main_task(mut spi: spi::Spi<'static, SPI3, DMA1_CH3, DMA1_CH4>) { | |||
| 24 | let mut write: String<128> = String::new(); | 23 | let mut write: String<128> = String::new(); |
| 25 | let mut read = [0; 128]; | 24 | let mut read = [0; 128]; |
| 26 | core::write!(&mut write, "Hello DMA World {}!\r\n", n).unwrap(); | 25 | core::write!(&mut write, "Hello DMA World {}!\r\n", n).unwrap(); |
| 27 | // read_write will slice the &mut read down to &write's actual length. | 26 | // transfer will slice the &mut read down to &write's actual length. |
| 28 | spi.read_write(&mut read, write.as_bytes()).await.ok(); | 27 | spi.transfer(&mut read, write.as_bytes()).await.ok(); |
| 29 | info!("read via spi+dma: {}", from_utf8(&read).unwrap()); | 28 | info!("read via spi+dma: {}", from_utf8(&read).unwrap()); |
| 30 | } | 29 | } |
| 31 | } | 30 | } |
