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/).
154154- example of using USB CDC with interrupts.
155155- Added non-blocking I2C based on DMA [ #534 ]
156156- Added Transactional I2C API [ #542 ]
157+ - Added wait method for DMA Transfer.
157158
158159[ #481 ] : https://github.com/stm32-rs/stm32f4xx-hal/pull/481
159160[ #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
13651365 & mut self . stream
13661366 }
13671367
1368+ /// Wait for the transfer to complete.
1369+ #[ inline( always) ]
1370+ pub fn wait ( & self ) {
1371+ while !STREAM :: get_transfer_complete_flag ( ) { }
1372+ }
1373+
13681374 /// Applies all fields in DmaConfig.
13691375 fn apply_config ( stream : & mut STREAM , config : config:: DmaConfig ) {
13701376 let msize = mem:: size_of :: < <PERIPHERAL as PeriAddress >:: MemSize > ( ) / 2 ;
You can’t perform that action at this time.
0 commit comments