Commit 2de4d591 authored by Damien George's avatar Damien George
Browse files

stmhal: Fix write_timed function for DAC(2).

Addresses issue #617.
parent f905ebb1
......@@ -295,7 +295,11 @@ mp_obj_t pyb_dac_write_timed(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg
DMA_Handle.Init.PeriphBurst = DMA_PBURST_SINGLE;
__HAL_LINKDMA(&DAC_Handle, DMA_Handle1, DMA_Handle);
if (self->dac_channel == DAC_CHANNEL_1) {
__HAL_LINKDMA(&DAC_Handle, DMA_Handle1, DMA_Handle);
} else {
__HAL_LINKDMA(&DAC_Handle, DMA_Handle2, DMA_Handle);
DAC_Handle.Instance = DAC;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment