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 @@ -154,6 +154,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
154
154
- example of using USB CDC with interrupts.
155
155
- Added non-blocking I2C based on DMA [ #534 ]
156
156
- Added Transactional I2C API [ #542 ]
157
+ - Added wait method for DMA Transfer.
157
158
158
159
[ #481 ] : https://github.com/stm32-rs/stm32f4xx-hal/pull/481
159
160
[ #489 ] : https://github.com/stm32-rs/stm32f4xx-hal/pull/489
Original file line number Diff line number Diff line change @@ -1365,6 +1365,12 @@ where
1365
1365
& mut self . stream
1366
1366
}
1367
1367
1368
+ /// Wait for the transfer to complete.
1369
+ #[ inline( always) ]
1370
+ pub fn wait ( & self ) {
1371
+ while !STREAM :: get_transfer_complete_flag ( ) { }
1372
+ }
1373
+
1368
1374
/// Applies all fields in DmaConfig.
1369
1375
fn apply_config ( stream : & mut STREAM , config : config:: DmaConfig ) {
1370
1376
let msize = mem:: size_of :: < <PERIPHERAL as PeriAddress >:: MemSize > ( ) / 2 ;
You can’t perform that action at this time.
0 commit comments