Skip to content

Commit

Permalink
Add more type args to transmute
Browse files Browse the repository at this point in the history
  • Loading branch information
usbalbin committed Dec 6, 2024
1 parent 1a3e756 commit d753c9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/mdma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ fn main() -> ! {
Transfer::init_master(
streams.1,
MemoryToMemory::new(),
unsafe { mem::transmute::<&mut [u8], &mut [u8]>(&mut target_buffer[..]) }, // Dest: TCM (stack)
unsafe {
mem::transmute::<&mut [u8], &mut [u8]>(&mut target_buffer[..])
}, // Dest: TCM (stack)
Some(source_buffer), // Source: TCM (stack)
config,
)
Expand Down
6 changes: 4 additions & 2 deletions examples/qspi_mdma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ fn main() -> ! {
_,
> = Transfer::init_master(
streams.0,
qspi, // Dest: QSPI
unsafe { mem::transmute(&mut source_buffer) }, // Source: TCM (stack)
qspi, // Dest: QSPI
unsafe {
mem::transmute::<&mut [u8; 80], &mut [u8; 80]>(&mut source_buffer)
}, // Source: TCM (stack)
None,
config,
);
Expand Down

0 comments on commit d753c9a

Please sign in to comment.