@@ -287,13 +287,13 @@ impl<'a, CH: DmaChannel> DmaTransfer<'a, CH> {
287
287
S : ReadBuffer < Word : Word > ,
288
288
D : WriteBuffer < Word : Word > ,
289
289
{
290
- let src_width = core:: mem:: size_of :: < S > ( ) ;
291
- let dest_width = core:: mem:: size_of :: < D > ( ) ;
290
+ let src_width = core:: mem:: size_of :: < S :: Word > ( ) ;
291
+ let dest_width = core:: mem:: size_of :: < D :: Word > ( ) ;
292
292
293
293
let ( src_ptr, src_words) = unsafe { source. read_buffer ( ) } ;
294
- let src_size = core :: mem :: size_of :: < S :: Word > ( ) * src_words;
294
+ let src_size = src_width * src_words;
295
295
let ( dest_ptr, dest_words) = unsafe { destination. write_buffer ( ) } ;
296
- let dest_size = core :: mem :: size_of :: < D :: Word > ( ) * dest_words;
296
+ let dest_size = dest_width * dest_words;
297
297
298
298
// Size must be aligned with destination width if source width is greater than destination
299
299
// width and packing mode is used, therefore the maximum size must be dictated by
@@ -310,8 +310,6 @@ impl<'a, CH: DmaChannel> DmaTransfer<'a, CH> {
310
310
src_size
311
311
} ;
312
312
313
- // We also need to ensure that the destination
314
-
315
313
Self :: new :: < S :: Word , D :: Word , MemoryToMemory > (
316
314
channel, config, src_ptr, dest_ptr, size,
317
315
)
0 commit comments