diff --git a/embassy-stm32f4/Cargo.toml b/embassy-stm32f4/Cargo.toml
index 654ea69a..1891a559 100644
--- a/embassy-stm32f4/Cargo.toml
+++ b/embassy-stm32f4/Cargo.toml
@@ -40,4 +40,4 @@ cortex-m-rt = "0.6.13"
cortex-m = { version = "0.6.4" }
embedded-hal = { version = "0.2.4" }
embedded-dma = { version = "0.1.2" }
-stm32f4xx-hal = { version = "0.8.3", features = ["rt"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git" }
+stm32f4xx-hal = { version = "0.8.3", features = ["rt"], git = "https://github.com/xoviat/stm32f4xx-hal.git", branch = "dma-is-done"}
diff --git a/embassy-stm32f4/src/lib.rs b/embassy-stm32f4/src/lib.rs
index 40386085..e6d523d2 100644
--- a/embassy-stm32f4/src/lib.rs
+++ b/embassy-stm32f4/src/lib.rs
@@ -2,6 +2,7 @@
#![feature(generic_associated_types)]
#![feature(asm)]
#![feature(type_alias_impl_trait)]
+#![feature(let_chains)]
#[cfg(not(any(
feature = "stm32f401",
diff --git a/embassy-stm32f4/src/uarte.rs b/embassy-stm32f4/src/uarte.rs
index 9e253dd9..273c384c 100644
--- a/embassy-stm32f4/src/uarte.rs
+++ b/embassy-stm32f4/src/uarte.rs
@@ -16,11 +16,14 @@ use core::task::{Context, Poll};
use cortex_m::singleton;
use embassy::util::Signal;
-use embedded_dma::{StaticReadBuffer, StaticWriteBuffer};
+use embedded_dma::{StaticReadBuffer, StaticWriteBuffer, WriteBuffer};
use crate::fmt::assert;
use crate::hal::dma::config::DmaConfig;
-use crate::hal::dma::{Channel4, PeripheralToMemory, Stream2, StreamsTuple, Transfer};
+use crate::hal::dma::{
+ Channel4, Channel7, MemoryToPeripheral, PeripheralToMemory, Stream2, Stream7, StreamsTuple,
+ Transfer,
+};
use crate::hal::gpio::gpioa::{PA10, PA9};
use crate::hal::gpio::{Alternate, AF10, AF7, AF9};
use crate::hal::gpio::{Floating, Input, Output, PushPull};
@@ -94,45 +97,15 @@ impl Uarte {
)
.unwrap();
- let isr = pins.dma.hisr;0
+ // let is_set = dma.hifcr.read().tcif7.bit_is_set();
- Uarte { instance: serial, dma: pins.dma, usart: pins.usart }
+ Uarte {
+ instance: serial,
+ dma: pins.dma,
+ usart: pins.usart,
+ }
}
- /// Sets the baudrate, parity and assigns the pins to the UARTE peripheral.
- // TODO: Make it take the same `Pins` structs nrf-hal (with optional RTS/CTS).
- // // TODO: #[cfg()] for smaller device variants without port register (nrf52810, ...).
- // pub fn configure(
- // &mut self,
- // rxd: &Pin>,
- // txd: &mut Pin