Pārlūkot izejas kodu

PT8211: Fix Teensy 3.x

dma.enable() needs to be called before setting I2S0_TCSR
dds
Frank pirms 5 gadiem
vecāks
revīzija
076aa90ce5
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 7 papildinājumiem un 2 dzēšanām
  1. +7
    -2
      output_pt8211.cpp

+ 7
- 2
output_pt8211.cpp Parādīt failu

@@ -71,8 +71,11 @@ void AudioOutputPT8211::begin(void)
dma.TCD->CSR = DMA_TCD_CSR_INTHALF | DMA_TCD_CSR_INTMAJOR;

dma.triggerAtHardwareEvent(DMAMUX_SOURCE_I2S0_TX);
update_responsibility = update_setup();
dma.attachInterrupt(isr);
dma.enable();
I2S0_TCSR |= I2S_TCSR_TE | I2S_TCSR_BCE | I2S_TCSR_FRDE | I2S_TCSR_FR;

return;
#elif defined(__IMXRT1052__) || defined(__IMXRT1062__)

#if defined(__IMXRT1052__)
@@ -96,10 +99,12 @@ void AudioOutputPT8211::begin(void)

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

void AudioOutputPT8211::isr(void)

Notiek ielāde…
Atcelt
Saglabāt