瀏覽代碼

Fix I2S output on Teensy 3.0

dds
PaulStoffregen 5 年之前
父節點
當前提交
7be225e01e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      output_i2s.cpp

+ 2
- 1
output_i2s.cpp 查看文件

@@ -66,6 +66,7 @@ void AudioOutputI2S::begin(void)
dma.TCD->BITER_ELINKNO = sizeof(i2s_tx_buffer) / 2;
dma.TCD->CSR = DMA_TCD_CSR_INTHALF | DMA_TCD_CSR_INTMAJOR;
dma.triggerAtHardwareEvent(DMAMUX_SOURCE_I2S0_TX);
dma.enable();

I2S0_TCSR = I2S_TCSR_SR;
I2S0_TCSR = I2S_TCSR_TE | I2S_TCSR_BCE | I2S_TCSR_FRDE;
@@ -85,13 +86,13 @@ void AudioOutputI2S::begin(void)
dma.TCD->CSR = DMA_TCD_CSR_INTHALF | DMA_TCD_CSR_INTMAJOR;
dma.TCD->DADDR = (void *)((uint32_t)&I2S1_TDR0 + 2);
dma.triggerAtHardwareEvent(DMAMUX_SOURCE_SAI1_TX);
dma.enable();

I2S1_RCSR |= I2S_RCSR_RE | I2S_RCSR_BCE;
I2S1_TCSR = I2S_TCSR_TE | I2S_TCSR_BCE | I2S_TCSR_FRDE;
#endif
update_responsibility = update_setup();
dma.attachInterrupt(isr);
dma.enable();
}



Loading…
取消
儲存