Skip to content

Commit 7b572fb

Browse files
committed
compile warnings idf 2.0
1 parent e91c22e commit 7b572fb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/AudioConfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@
175175
#if ESP_IDF_VERSION_MAJOR < 4 && !defined(I2S_COMM_FORMAT_STAND_I2S)
176176
# define I2S_COMM_FORMAT_STAND_I2S (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_LSB)
177177
# define I2S_COMM_FORMAT_STAND_MSB (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB)
178+
# define I2S_COMM_FORMAT_STAND_PCM_LONG (I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_LONG)
179+
# define I2S_COMM_FORMAT_STAND_PCM_SHORT (I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_SHORT)
180+
178181
typedef int eps32_i2s_sample_rate_type;
179182
#else
180183
typedef uint32_t eps32_i2s_sample_rate_type;

src/AudioI2S/I2SESP32.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class I2SBase {
5252
.dma_buf_len = I2S_BUFFER_SIZE,
5353
.use_apll = (bool) cfg.use_apll,
5454
.tx_desc_auto_clear = I2S_AUTO_CLEAR,
55-
.fixed_mclk = (eps32_i2s_sample_rate_type) (cfg.use_apll ? cfg.sample_rate * cfg.apll_frequency_factor : 0 )
55+
.fixed_mclk = (int) (cfg.use_apll ? cfg.sample_rate * cfg.apll_frequency_factor : 0 )
5656

5757
};
5858
i2s_config = i2s_config_new;
@@ -223,9 +223,9 @@ class I2SBase {
223223
case I2S_LEFT_JUSTIFIED_FORMAT:
224224
return (i2s_comm_format_t) I2S_COMM_FORMAT_STAND_MSB;
225225
case I2S_PCM_LONG:
226-
return (i2s_comm_format_t) I2S_COMM_FORMAT_PCM_LONG;
226+
return (i2s_comm_format_t) I2S_COMM_FORMAT_STAND_PCM_LONG;
227227
case I2S_PCM_SHORT:
228-
return (i2s_comm_format_t) I2S_COMM_FORMAT_PCM_SHORT;
228+
return (i2s_comm_format_t) I2S_COMM_FORMAT_STAND_PCM_SHORT;
229229

230230
default:
231231
LOGE("unsupported mode");

0 commit comments

Comments
 (0)