aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/dma
diff options
context:
space:
mode:
authorelagil <[email protected]>2025-08-25 21:10:59 +0200
committerDario Nieuwenhuis <[email protected]>2025-09-05 14:43:29 +0200
commitdb7828538f43d4ebf39ca4291057bd67876bbfb3 (patch)
tree32d6d08c096ff22998eb09f76d8c29698b2c7863 /embassy-stm32/src/dma
parente9783ee28e9bdd89ffaeffb24bbff207c1ceb837 (diff)
fix: consolidate naming
Diffstat (limited to 'embassy-stm32/src/dma')
-rw-r--r--embassy-stm32/src/dma/gpdma/mod.rs20
-rw-r--r--embassy-stm32/src/dma/gpdma/ringbuffered.rs10
2 files changed, 15 insertions, 15 deletions
diff --git a/embassy-stm32/src/dma/gpdma/mod.rs b/embassy-stm32/src/dma/gpdma/mod.rs
index 074447148..7b317d4bb 100644
--- a/embassy-stm32/src/dma/gpdma/mod.rs
+++ b/embassy-stm32/src/dma/gpdma/mod.rs
@@ -359,7 +359,7 @@ impl AnyChannel {
359 ch.cr().modify(|w| w.set_en(true)); 359 ch.cr().modify(|w| w.set_en(true));
360 } 360 }
361 361
362 fn request_suspend(&self) { 362 fn request_pause(&self) {
363 let info = self.info(); 363 let info = self.info();
364 let ch = info.dma.ch(info.num); 364 let ch = info.dma.ch(info.num);
365 365
@@ -377,7 +377,7 @@ impl AnyChannel {
377 let info = self.info(); 377 let info = self.info();
378 let ch = info.dma.ch(info.num); 378 let ch = info.dma.ch(info.num);
379 379
380 self.request_suspend(); 380 self.request_pause();
381 while self.is_running() {} 381 while self.is_running() {}
382 382
383 ch.cr().modify(|w| w.set_reset(true)); 383 ch.cr().modify(|w| w.set_reset(true));
@@ -436,8 +436,8 @@ impl<'a, const ITEM_COUNT: usize> LinkedListTransfer<'a, ITEM_COUNT> {
436 /// To resume the transfer, call [`request_resume`](Self::request_resume) again. 436 /// To resume the transfer, call [`request_resume`](Self::request_resume) again.
437 /// 437 ///
438 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false. 438 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false.
439 pub fn request_suspend(&mut self) { 439 pub fn request_pause(&mut self) {
440 self.channel.request_suspend() 440 self.channel.request_pause()
441 } 441 }
442 442
443 /// Request the transfer to resume after being suspended. 443 /// Request the transfer to resume after being suspended.
@@ -448,7 +448,7 @@ impl<'a, const ITEM_COUNT: usize> LinkedListTransfer<'a, ITEM_COUNT> {
448 /// Request the DMA to reset. 448 /// Request the DMA to reset.
449 /// 449 ///
450 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer 450 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer
451 /// at a later point with the same configuration, see [`request_suspend`](Self::request_suspend) instead. 451 /// at a later point with the same configuration, see [`request_pause`](Self::request_pause) instead.
452 pub fn request_reset(&mut self) { 452 pub fn request_reset(&mut self) {
453 self.channel.request_reset() 453 self.channel.request_reset()
454 } 454 }
@@ -480,7 +480,7 @@ impl<'a, const ITEM_COUNT: usize> LinkedListTransfer<'a, ITEM_COUNT> {
480 480
481impl<'a, const ITEM_COUNT: usize> Drop for LinkedListTransfer<'a, ITEM_COUNT> { 481impl<'a, const ITEM_COUNT: usize> Drop for LinkedListTransfer<'a, ITEM_COUNT> {
482 fn drop(&mut self) { 482 fn drop(&mut self) {
483 self.request_suspend(); 483 self.request_pause();
484 while self.is_running() {} 484 while self.is_running() {}
485 485
486 // "Subsequent reads and writes cannot be moved ahead of preceding reads." 486 // "Subsequent reads and writes cannot be moved ahead of preceding reads."
@@ -634,8 +634,8 @@ impl<'a> Transfer<'a> {
634 /// To resume the transfer, call [`request_resume`](Self::request_resume) again. 634 /// To resume the transfer, call [`request_resume`](Self::request_resume) again.
635 /// 635 ///
636 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false. 636 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false.
637 pub fn request_suspend(&mut self) { 637 pub fn request_pause(&mut self) {
638 self.channel.request_suspend() 638 self.channel.request_pause()
639 } 639 }
640 640
641 /// Request the transfer to resume after being suspended. 641 /// Request the transfer to resume after being suspended.
@@ -646,7 +646,7 @@ impl<'a> Transfer<'a> {
646 /// Request the DMA to reset. 646 /// Request the DMA to reset.
647 /// 647 ///
648 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer 648 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer
649 /// at a later point with the same configuration, see [`request_suspend`](Self::request_suspend) instead. 649 /// at a later point with the same configuration, see [`request_pause`](Self::request_pause) instead.
650 pub fn request_reset(&mut self) { 650 pub fn request_reset(&mut self) {
651 self.channel.request_reset() 651 self.channel.request_reset()
652 } 652 }
@@ -678,7 +678,7 @@ impl<'a> Transfer<'a> {
678 678
679impl<'a> Drop for Transfer<'a> { 679impl<'a> Drop for Transfer<'a> {
680 fn drop(&mut self) { 680 fn drop(&mut self) {
681 self.request_suspend(); 681 self.request_pause();
682 while self.is_running() {} 682 while self.is_running() {}
683 683
684 // "Subsequent reads and writes cannot be moved ahead of preceding reads." 684 // "Subsequent reads and writes cannot be moved ahead of preceding reads."
diff --git a/embassy-stm32/src/dma/gpdma/ringbuffered.rs b/embassy-stm32/src/dma/gpdma/ringbuffered.rs
index 2f17a0587..0f1c42a8b 100644
--- a/embassy-stm32/src/dma/gpdma/ringbuffered.rs
+++ b/embassy-stm32/src/dma/gpdma/ringbuffered.rs
@@ -137,7 +137,7 @@ impl<'a, W: Word> ReadableRingBuffer<'a, W> {
137 /// 137 ///
138 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false. 138 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false.
139 pub fn request_pause(&mut self) { 139 pub fn request_pause(&mut self) {
140 self.channel.request_suspend() 140 self.channel.request_pause()
141 } 141 }
142 142
143 /// Request the DMA to resume transfers after being suspended. 143 /// Request the DMA to resume transfers after being suspended.
@@ -148,7 +148,7 @@ impl<'a, W: Word> ReadableRingBuffer<'a, W> {
148 /// Request the DMA to reset. 148 /// Request the DMA to reset.
149 /// 149 ///
150 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer 150 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer
151 /// at a later point with the same configuration, see [`request_suspend`](Self::request_suspend) instead. 151 /// at a later point with the same configuration, see [`request_pause`](Self::request_pause) instead.
152 pub fn request_reset(&mut self) { 152 pub fn request_reset(&mut self) {
153 self.channel.request_reset() 153 self.channel.request_reset()
154 } 154 }
@@ -280,7 +280,7 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> {
280 /// 280 ///
281 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false. 281 /// This doesn't immediately stop the transfer, you have to wait until [`is_running`](Self::is_running) returns false.
282 pub fn request_pause(&mut self) { 282 pub fn request_pause(&mut self) {
283 self.channel.request_suspend() 283 self.channel.request_pause()
284 } 284 }
285 285
286 /// Request the DMA to resume transfers after being suspended. 286 /// Request the DMA to resume transfers after being suspended.
@@ -291,7 +291,7 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> {
291 /// Request the DMA to reset. 291 /// Request the DMA to reset.
292 /// 292 ///
293 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer 293 /// The configuration for this channel will **not be preserved**. If you need to restart the transfer
294 /// at a later point with the same configuration, see [`request_suspend`](Self::request_suspend) instead. 294 /// at a later point with the same configuration, see [`request_pause`](Self::request_pause) instead.
295 pub fn request_reset(&mut self) { 295 pub fn request_reset(&mut self) {
296 self.channel.request_reset() 296 self.channel.request_reset()
297 } 297 }
@@ -325,7 +325,7 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> {
325 325
326impl<'a, W: Word> Drop for WritableRingBuffer<'a, W> { 326impl<'a, W: Word> Drop for WritableRingBuffer<'a, W> {
327 fn drop(&mut self) { 327 fn drop(&mut self) {
328 self.request_suspend(); 328 self.request_pause();
329 while self.is_running() {} 329 while self.is_running() {}
330 330
331 // "Subsequent reads and writes cannot be moved ahead of preceding reads." 331 // "Subsequent reads and writes cannot be moved ahead of preceding reads."