You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
593: Added U(S)ART DMA traits for HAL serial types r=burrbull a=HelloWorldTeraByte
DMA traits for the HAL serial type were missing for some of the U(S)ARTs. The trait was only implemented for the PAC in some places.
The users can now for example use.
```
let dma1 = StreamsTuple::new(cx.device.DMA1);
let uart_dma_cfg = DmaConfig::default().transfer_complete_interrupt(true).memory_increment(true);
let (tx, rx) = Serial::new(
cx.device.UART4,
(tx_pin, rx_pin),
serial::Config::default()
.baudrate(9600.bps())
.wordlength_8()
.parity_none()
.stopbits(serial::config::StopBits::STOP1)
.dma(serial::config::DmaConfig::Rx),
&clocks,
)
.unwrap()
.split();
let mut dma_rx_transfer = Transfer::init_peripheral_to_memory(
dma1.2,
rx,
cx.local.rx_buf0,
None,
uart_dma_cfg,
);
```
Without the pull request, the users would get `DMASet<..>` not implemented error for some the U(S)ARTs.
Co-authored-by: randi <[email protected]>
0 commit comments