Skip to content

Commit

Permalink
ESP32 I2S prevent uninitialized pin
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Jun 12, 2024
1 parent beb311f commit 58714de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AudioI2S/I2SConfigESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class I2SConfigESP32 : public AudioInfo {
int port_no = 0; // processor dependent port
int pin_ws = PIN_I2S_WS;
int pin_bck = PIN_I2S_BCK;
int pin_data; // rx or tx pin dependent on mode: tx pin for RXTX_MODE
int pin_data = -1; // rx or tx pin dependent on mode: tx pin for RXTX_MODE
int pin_data_rx = -1; // rx pin for RXTX_MODE
int pin_mck = PIN_I2S_MCK;
int buffer_count = I2S_BUFFER_COUNT;
Expand Down
4 changes: 2 additions & 2 deletions src/AudioI2S/I2SConfigESP32V1.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class I2SConfigESP32V1 : public AudioInfo {
int port_no = 0; // processor dependent port
int pin_ws = PIN_I2S_WS;
int pin_bck = PIN_I2S_BCK;
int pin_data; // rx or tx pin dependent on mode: tx pin for RXTX_MODE
int pin_data_rx; // rx pin for RXTX_MODE
int pin_data = -1; // rx or tx pin dependent on mode: tx pin for RXTX_MODE
int pin_data_rx = -1; // rx pin for RXTX_MODE
int pin_mck = PIN_I2S_MCK;
int buffer_count = I2S_BUFFER_COUNT;
int buffer_size = I2S_BUFFER_SIZE;
Expand Down

0 comments on commit 58714de

Please sign in to comment.