stm32/uart: feature-gate ringbuffer out when using gpdma, not supported yet.

This commit is contained in:
Dario Nieuwenhuis 2023-05-01 18:15:46 +02:00
parent 25864ae4dc
commit 96e8a7ddb9
4 changed files with 20 additions and 7 deletions

View File

@ -1,3 +1,5 @@
#![cfg_attr(gpdma, allow(unused))]
use core::ops::Range; use core::ops::Range;
use core::sync::atomic::{compiler_fence, Ordering}; use core::sync::atomic::{compiler_fence, Ordering};

View File

@ -980,7 +980,10 @@ mod eio {
pub use buffered::*; pub use buffered::*;
#[cfg(feature = "nightly")] #[cfg(feature = "nightly")]
mod buffered; mod buffered;
#[cfg(not(gpdma))]
mod rx_ringbuffered; mod rx_ringbuffered;
#[cfg(not(gpdma))]
pub use rx_ringbuffered::RingBufferedUartRx; pub use rx_ringbuffered::RingBufferedUartRx;
#[cfg(usart_v1)] #[cfg(usart_v1)]

View File

@ -5,18 +5,19 @@ version = "0.1.0"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
[features] [features]
stm32f103c8 = ["embassy-stm32/stm32f103c8"] # Blue Pill stm32f103c8 = ["embassy-stm32/stm32f103c8", "not-gpdma"] # Blue Pill
stm32f429zi = ["embassy-stm32/stm32f429zi", "sdmmc", "chrono"] # Nucleo stm32f429zi = ["embassy-stm32/stm32f429zi", "sdmmc", "chrono", "not-gpdma"] # Nucleo
stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo stm32g071rb = ["embassy-stm32/stm32g071rb", "not-gpdma"] # Nucleo
stm32c031c6 = ["embassy-stm32/stm32c031c6"] # Nucleo stm32c031c6 = ["embassy-stm32/stm32c031c6", "not-gpdma"] # Nucleo
stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo stm32g491re = ["embassy-stm32/stm32g491re", "not-gpdma"] # Nucleo
stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo stm32h755zi = ["embassy-stm32/stm32h755zi-cm7", "not-gpdma"] # Nucleo
stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo stm32wb55rg = ["embassy-stm32/stm32wb55rg", "not-gpdma"] # Nucleo
stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo
stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board
sdmmc = [] sdmmc = []
chrono = ["embassy-stm32/chrono", "dep:chrono"] chrono = ["embassy-stm32/chrono", "dep:chrono"]
not-gpdma = []
[dependencies] [dependencies]
embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
@ -80,6 +81,11 @@ name = "usart_dma"
path = "src/bin/usart_dma.rs" path = "src/bin/usart_dma.rs"
required-features = [] required-features = []
[[bin]]
name = "usart_rx_ringbuffered"
path = "src/bin/usart_rx_ringbuffered.rs"
required-features = [ "not-gpdma",]
# END TESTS # END TESTS
[profile.dev] [profile.dev]

View File

@ -1,3 +1,5 @@
// required-features: not-gpdma
#![no_std] #![no_std]
#![no_main] #![no_main]
#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)]