fix(stm32): Fix write buffer lifetime for repeated writes
This commit is contained in:
@ -102,15 +102,14 @@ foreach_dma_channel! {
|
||||
)
|
||||
}
|
||||
|
||||
unsafe fn start_write_repeated<W: Word>(&mut self, request: Request, repeated: W, count: usize, reg_addr: *mut W, options: TransferOptions) {
|
||||
let buf = [repeated];
|
||||
unsafe fn start_write_repeated<W: Word>(&mut self, request: Request, repeated: &[W; 1], count: usize, reg_addr: *mut W, options: TransferOptions) {
|
||||
low_level_api::start_transfer(
|
||||
pac::$dma_peri,
|
||||
$channel_num,
|
||||
request,
|
||||
vals::Dir::MEMORYTOPERIPHERAL,
|
||||
reg_addr as *const u32,
|
||||
buf.as_ptr() as *mut u32,
|
||||
repeated.as_ptr() as *mut u32,
|
||||
count,
|
||||
false,
|
||||
vals::Size::from(W::bits()),
|
||||
|
Reference in New Issue
Block a user