diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-12-08 01:51:39 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-12-08 01:51:39 +0100 |
| commit | fd2fe62b5f6f5c9b8dceef33ffe3fd8c58eb2bec (patch) | |
| tree | cc8191bf0dfe493457fd2125b97c2b1cd46d761f /embassy-stm32/src/dma/mod.rs | |
| parent | b2910558d36929dfde056f609a8af23d925e67f6 (diff) | |
stm32/dma: rename is_stopped to is_running.
Note that this does NOT invert the result of `en()` because it was
wrong before.
Diffstat (limited to 'embassy-stm32/src/dma/mod.rs')
| -rw-r--r-- | embassy-stm32/src/dma/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-stm32/src/dma/mod.rs b/embassy-stm32/src/dma/mod.rs index 3928bbb92..f27a55f61 100644 --- a/embassy-stm32/src/dma/mod.rs +++ b/embassy-stm32/src/dma/mod.rs | |||
| @@ -49,7 +49,7 @@ pub(crate) mod sealed { | |||
| 49 | fn request_stop(&mut self); | 49 | fn request_stop(&mut self); |
| 50 | 50 | ||
| 51 | /// Returns whether this channel is active or stopped. | 51 | /// Returns whether this channel is active or stopped. |
| 52 | fn is_stopped(&self) -> bool; | 52 | fn is_running(&self) -> bool; |
| 53 | 53 | ||
| 54 | /// Returns the total number of remaining transfers. | 54 | /// Returns the total number of remaining transfers. |
| 55 | fn remaining_transfers(&mut self) -> u16; | 55 | fn remaining_transfers(&mut self) -> u16; |
| @@ -173,10 +173,10 @@ mod transfers { | |||
| 173 | 173 | ||
| 174 | // TODO in the future, error checking could be added so that this function returns an error | 174 | // TODO in the future, error checking could be added so that this function returns an error |
| 175 | 175 | ||
| 176 | if channel.is_stopped() { | 176 | if channel.is_running() { |
| 177 | Poll::Ready(()) | ||
| 178 | } else { | ||
| 179 | Poll::Pending | 177 | Poll::Pending |
| 178 | } else { | ||
| 179 | Poll::Ready(()) | ||
| 180 | } | 180 | } |
| 181 | }) | 181 | }) |
| 182 | .await | 182 | .await |
