Browse Source

Slightly more efficient stereo DAC DMA

dds
PaulStoffregen 8 years ago
parent
commit
74316b04f5
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      output_dacs.cpp

+ 2
- 2
output_dacs.cpp View File

@@ -69,8 +69,8 @@ void AudioOutputAnalogStereo::begin(void)
}

dma.TCD->SADDR = dac_buffer;
dma.TCD->SOFF = 2;
dma.TCD->ATTR = DMA_TCD_ATTR_SSIZE(DMA_TCD_ATTR_SIZE_16BIT) |
dma.TCD->SOFF = 4;
dma.TCD->ATTR = DMA_TCD_ATTR_SSIZE(DMA_TCD_ATTR_SIZE_32BIT) |
DMA_TCD_ATTR_DSIZE(DMA_TCD_ATTR_SIZE_16BIT);
dma.TCD->NBYTES_MLNO = DMA_TCD_NBYTES_MLOFFYES_NBYTES(4) | DMA_TCD_NBYTES_DMLOE |
DMA_TCD_NBYTES_MLOFFYES_MLOFF((&DAC0_DAT0L - &DAC1_DAT0L) * 2);

Loading…
Cancel
Save