Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio::setPinout returns a boolean 'true' even if the call to 'i2s_set_pin' fails. #72

Merged
merged 2 commits into from
Oct 27, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Audio::setPinout returned a boolean 'true' even if the call to 'i2s_s…
…et_pin' fails.

With this PR Audio::setPinout'i2s_set_pin' returns a 'false' if the call to 'i2s_set_pin' fails.
  • Loading branch information
CelliesProjects committed Oct 25, 2020
commit cd9d72540099bf00f8d318d019aafe84c3b6dc5d
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;
esp_err_t result = i2s_set_pin((i2s_port_t)m_i2s_num, &pins);
return (result == ESP_OK);
}
//---------------------------------------------------------------------------------------------------------------------
uint32_t Audio::getFileSize(){
Expand Down