@@ -356,7 +356,7 @@ class I2SDriverESP32V1 {
356
356
slots |= 1 << j;
357
357
}
358
358
// setup default format
359
- i2s_tdm_slot_config_t cfg = I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG (
359
+ i2s_tdm_slot_config_t slot_cfg = I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG (
360
360
(i2s_data_bit_width_t )cfg.bits_per_sample , I2S_SLOT_MODE_STEREO,
361
361
(i2s_tdm_slot_mask_t )slots);
362
362
@@ -365,26 +365,26 @@ class I2SDriverESP32V1 {
365
365
case I2S_LSB_FORMAT:
366
366
case I2S_PHILIPS_FORMAT:
367
367
case I2S_STD_FORMAT:
368
- cfg = I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG (
368
+ slot_cfg = I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG (
369
369
(i2s_data_bit_width_t )cfg.bits_per_sample , I2S_SLOT_MODE_STEREO,
370
370
(i2s_tdm_slot_mask_t )slots);
371
371
break ;
372
372
case I2S_LEFT_JUSTIFIED_FORMAT:
373
373
case I2S_MSB_FORMAT:
374
- cfg = I2S_TDM_MSB_SLOT_DEFAULT_CONFIG (
374
+ slot_cfg = I2S_TDM_MSB_SLOT_DEFAULT_CONFIG (
375
375
(i2s_data_bit_width_t )cfg.bits_per_sample , I2S_SLOT_MODE_STEREO,
376
376
(i2s_tdm_slot_mask_t )slots);
377
377
break ;
378
378
case I2S_PCM:
379
- cfg = I2S_TDM_PCM_LONG_SLOT_DEFAULT_CONFIG (
379
+ slot_cfg = I2S_TDM_PCM_LONG_SLOT_DEFAULT_CONFIG (
380
380
(i2s_data_bit_width_t )cfg.bits_per_sample , I2S_SLOT_MODE_STEREO,
381
381
(i2s_tdm_slot_mask_t )slots);
382
382
break ;
383
383
default :
384
384
LOGE (" TDM: Unsupported format" );
385
385
}
386
386
387
- return cfg ;
387
+ return slot_cfg ;
388
388
}
389
389
390
390
i2s_chan_config_t getChannelConfig (I2SConfigESP32V1 &cfg) {
0 commit comments