Bladeren bron

PT8211: Fix Teensy 3.x

dma.enable() needs to be called before setting I2S0_TCSR
dds
Frank 5 jaren geleden
bovenliggende
commit
076aa90ce5
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 7 en 2 verwijderingen
  1. +7
    -2
      output_pt8211.cpp

+ 7
- 2
output_pt8211.cpp Bestand weergeven

@@ -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)

Laden…
Annuleren
Opslaan