diff options
| author | James Munns <[email protected]> | 2025-12-09 18:35:45 +0100 |
|---|---|---|
| committer | James Munns <[email protected]> | 2025-12-09 18:35:45 +0100 |
| commit | 2d7328d5839e196f7b6c275283a50fd4ac019440 (patch) | |
| tree | e86805ff27255a211adf3cebf45b6335261c363a /embassy-mcxa/src | |
| parent | a75aa12d928d1ba0c1759052a652426ab965f739 (diff) | |
rustfmt
Diffstat (limited to 'embassy-mcxa/src')
| -rw-r--r-- | embassy-mcxa/src/dma.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/embassy-mcxa/src/dma.rs b/embassy-mcxa/src/dma.rs index e31cf5907..8d519d99b 100644 --- a/embassy-mcxa/src/dma.rs +++ b/embassy-mcxa/src/dma.rs | |||
| @@ -773,7 +773,12 @@ impl<C: Channel> DmaChannel<C> { | |||
| 773 | /// | 773 | /// |
| 774 | /// The source and destination buffers must remain valid for the | 774 | /// The source and destination buffers must remain valid for the |
| 775 | /// duration of the transfer. | 775 | /// duration of the transfer. |
| 776 | pub fn mem_to_mem<W: Word>(&self, src: &[W], dst: &mut [W], options: TransferOptions) -> Result<Transfer<'_>, Error> { | 776 | pub fn mem_to_mem<W: Word>( |
| 777 | &self, | ||
| 778 | src: &[W], | ||
| 779 | dst: &mut [W], | ||
| 780 | options: TransferOptions, | ||
| 781 | ) -> Result<Transfer<'_>, Error> { | ||
| 777 | let mut invalid = false; | 782 | let mut invalid = false; |
| 778 | invalid |= src.is_empty(); | 783 | invalid |= src.is_empty(); |
| 779 | invalid |= src.len() > dst.len(); | 784 | invalid |= src.len() > dst.len(); |
| @@ -1789,7 +1794,7 @@ impl<'a> Transfer<'a> { | |||
| 1789 | if es.err().is_error() { | 1794 | if es.err().is_error() { |
| 1790 | // Currently, all error fields are in the lowest 8 bits, as-casting truncates | 1795 | // Currently, all error fields are in the lowest 8 bits, as-casting truncates |
| 1791 | let errs = es.bits() as u8; | 1796 | let errs = es.bits() as u8; |
| 1792 | return Poll::Ready(Err(TransferErrorRaw(errs))) | 1797 | return Poll::Ready(Err(TransferErrorRaw(errs))); |
| 1793 | } | 1798 | } |
| 1794 | 1799 | ||
| 1795 | // Check if we're past the half-way point | 1800 | // Check if we're past the half-way point |
| @@ -1907,7 +1912,6 @@ impl TransferErrorRaw { | |||
| 1907 | pub fn has_source_address_err(&self) -> bool { | 1912 | pub fn has_source_address_err(&self) -> bool { |
| 1908 | (self.0 & (1 << 7)) != 0 | 1913 | (self.0 & (1 << 7)) != 0 |
| 1909 | } | 1914 | } |
| 1910 | |||
| 1911 | } | 1915 | } |
| 1912 | 1916 | ||
| 1913 | impl Iterator for TransferErrorRawIter { | 1917 | impl Iterator for TransferErrorRawIter { |
