Skip to content

Commit 6b6db37

Browse files
authored
Update PDM_SPM1423.ino
1 parent dfb7286 commit 6b6db37

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/Unit/PDM_SPM1423/PDM_SPM1423.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ bool InitI2SSpakerOrMic(int mode) {
4646
// 固定为12位立体声MSB
4747
.channel_format =
4848
I2S_CHANNEL_FMT_ONLY_RIGHT, // Set the channel format. 设置频道格式
49+
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(4, 1, 0)
4950
.communication_format =
5051
I2S_COMM_FORMAT_STAND_I2S, // Set the format of the communication.
51-
// 设置通讯格式
52+
#else // 设置通讯格式
53+
.communication_format = I2S_COMM_FORMAT_I2S,
54+
#endif
5255
.intr_alloc_flags =
5356
ESP_INTR_FLAG_LEVEL1, // Set the interrupt flag. 设置中断的标志
5457
.dma_buf_count = 2, // DMA buffer count. DMA缓冲区计数

0 commit comments

Comments
 (0)