Skip to content

Commit 7e08ea4

Browse files
Merge #313
313: update embedded dma -> 0.2.0 r=richardeoin a=andrewgazelka Co-authored-by: Andrew Gazelka <andrew.gazelka@gmail.com>
2 parents f83198b + 5432fae commit 7e08ea4

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ targets = ["thumbv7em-none-eabihf"]
2727
[dependencies]
2828
fugit = "0.3.3"
2929
embedded-hal = { version = "0.2.6", features = ["unproven"] }
30-
embedded-dma = "0.1.2"
30+
embedded-dma = "0.2.0"
3131
cortex-m = "^0.7.4"
3232
defmt = { version = ">=0.2.0,<0.4", optional = true }
3333
stm32h7 = { version = "^0.14.0", default-features = false }

src/dma/mod.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@ use core::{
9797
ptr,
9898
sync::atomic::{fence, Ordering},
9999
};
100-
use embedded_dma::{StaticReadBuffer, StaticWriteBuffer};
100+
101+
use embedded_dma::{ReadBuffer, WriteBuffer};
102+
103+
use traits::{
104+
sealed::Bits, Direction, DoubleBufferedConfig, DoubleBufferedStream,
105+
MasterStream, Stream, TargetAddress,
106+
};
101107

102108
#[macro_use]
103109
mod macros;
@@ -110,10 +116,6 @@ pub mod bdma;
110116
pub mod mdma;
111117

112118
pub mod traits;
113-
use traits::{
114-
sealed::Bits, Direction, DoubleBufferedConfig, DoubleBufferedStream,
115-
MasterStream, Stream, TargetAddress,
116-
};
117119

118120
/// Errors.
119121
#[derive(PartialEq, Debug, Copy, Clone)]
@@ -757,8 +759,8 @@ macro_rules! db_transfer_def {
757759
};
758760
}
759761

760-
db_transfer_def!(DBTransfer, init, StaticWriteBuffer, write_buffer, mut;);
761-
db_transfer_def!(ConstDBTransfer, init_const, StaticReadBuffer, read_buffer;
762+
db_transfer_def!(DBTransfer, init, WriteBuffer, write_buffer, mut;);
763+
db_transfer_def!(ConstDBTransfer, init_const, ReadBuffer, read_buffer;
762764
assert!(DIR::direction() != DmaDirection::PeripheralToMemory));
763765

764766
impl<STREAM, CONFIG, PERIPHERAL, DIR, BUF, TXFRT>
@@ -873,8 +875,8 @@ where
873875
STREAM: MasterStream + Stream<Config = mdma::MdmaConfig>,
874876
DIR: Direction,
875877
PERIPHERAL: TargetAddress<DIR>,
876-
BUF: StaticWriteBuffer<Word = BUF_WORD>, // Buf can be sized independently
877-
// from the peripheral
878+
BUF: WriteBuffer<Word = BUF_WORD>, // Buf can be sized independently
879+
// from the peripheral
878880
{
879881
/// For a given configuration, determine the size and offset for the source
880882
/// and destination

0 commit comments

Comments
 (0)