Browse Source

Merge pull request #371 from FrankBoesing/patch-1

PT8211: fix beep on startup
dds
Paul Stoffregen 3 years ago
parent
commit
5e4bc3195c
No account linked to committer's email address
2 changed files with 5 additions and 1 deletions
  1. +3
    -1
      output_pt8211.cpp
  2. +2
    -0
      output_pt8211_2.cpp

+ 3
- 1
output_pt8211.cpp View File



void AudioOutputPT8211::begin(void) void AudioOutputPT8211::begin(void)
{ {
memset(i2s_tx_buffer, 0, sizeof(i2s_tx_buffer));
dma.begin(true); // Allocate the DMA channel first dma.begin(true); // Allocate the DMA channel first


block_left_1st = NULL; block_left_1st = NULL;
I2S0_TCSR |= I2S_TCSR_TE | I2S_TCSR_BCE | I2S_TCSR_FRDE | I2S_TCSR_FR; I2S0_TCSR |= I2S_TCSR_TE | I2S_TCSR_BCE | I2S_TCSR_FRDE | I2S_TCSR_FR;
return; return;
#elif defined(__IMXRT1052__) || defined(__IMXRT1062__) #elif defined(__IMXRT1052__) || defined(__IMXRT1062__)
#if defined(__IMXRT1052__) #if defined(__IMXRT1052__)
CORE_PIN6_CONFIG = 3; //1:TX_DATA0 CORE_PIN6_CONFIG = 3; //1:TX_DATA0
#elif defined(__IMXRT1062__) #elif defined(__IMXRT1062__)
arm_dcache_flush_delete(i2s_tx_buffer, sizeof(i2s_tx_buffer));
CORE_PIN7_CONFIG = 3; //1:TX_DATA0 CORE_PIN7_CONFIG = 3; //1:TX_DATA0
#endif #endif



+ 2
- 0
output_pt8211_2.cpp View File

FLASHMEM FLASHMEM
void AudioOutputPT8211_2::begin(void) void AudioOutputPT8211_2::begin(void)
{ {
memset(i2s_tx_buffer, 0, sizeof(i2s_tx_buffer));
arm_dcache_flush_delete(i2s_tx_buffer, sizeof(i2s_tx_buffer));
dma.begin(true); // Allocate the DMA channel first dma.begin(true); // Allocate the DMA channel first


block_left_1st = NULL; block_left_1st = NULL;

Loading…
Cancel
Save