File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
43
43
- example of using USB CDC with interrupts.
44
44
- Added non-blocking I2C based on DMA [ #534 ]
45
45
- Added Transactional I2C API [ #542 ]
46
+ - Added wait method for DMA Transfer.
46
47
47
48
[ #481 ] : https://github.com/stm32-rs/stm32f4xx-hal/pull/481
48
49
[ #489 ] : https://github.com/stm32-rs/stm32f4xx-hal/pull/489
Original file line number Diff line number Diff line change @@ -1355,6 +1355,12 @@ where
1355
1355
& mut self . stream
1356
1356
}
1357
1357
1358
+ /// Wait for the transfer to complete.
1359
+ #[ inline( always) ]
1360
+ pub fn wait ( & self ) {
1361
+ while !STREAM :: get_transfer_complete_flag ( ) { }
1362
+ }
1363
+
1358
1364
/// Applies all fields in DmaConfig.
1359
1365
fn apply_config ( stream : & mut STREAM , config : config:: DmaConfig ) {
1360
1366
let msize = mem:: size_of :: < <PERIPHERAL as PeriAddress >:: MemSize > ( ) / 2 ;
You can’t perform that action at this time.
0 commit comments