Skip to content

Commit

Permalink
Merge pull request #72 from CelliesProjects/setPinout_result
Browse files Browse the repository at this point in the history
Audio::setPinout returns a boolean 'true' even if the call to 'i2s_set_pin' fails.
  • Loading branch information
schreibfaul1 committed Oct 27, 2020
2 parents b9f787e + ed6ad82 commit 391d37f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2021,8 +2021,8 @@ bool Audio::setPinout(uint8_t BCLK, uint8_t LRC, uint8_t DOUT, int8_t DIN){
.data_out_num = m_DOUT,
.data_in_num = m_DIN
};
i2s_set_pin((i2s_port_t)m_i2s_num, &pins);
return true;
const esp_err_t result = i2s_set_pin((i2s_port_t)m_i2s_num, &pins);
return (result == ESP_OK);
}
//---------------------------------------------------------------------------------------------------------------------
uint32_t Audio::getFileSize(){
Expand Down

0 comments on commit 391d37f

Please sign in to comment.