I2S支持DMA;
I2S可以直接利用DAC来输出模拟信号 (GPIO 25 & GPIO 26);
高精度时钟使能参数: .use_apll = true
ESP32配置外设一般都是配置一个结构体,I2S也不例外:
static const i2s_config_t i2s_config = { .mode = I2S_MODE_MASTER | I2S_MODE_TX, .sample_rate = 44100, .bits_per_sample = 16, .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, .communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB, .intr_alloc_flags = 0, // default interrupt priority .dma_buf_count = 8, .dma_buf_len = 64, .use_apll = false };