Skip to content

Commit 50ae166

Browse files
committed
Fix get i2s handle function on Tanmatsu
1 parent e6b9791 commit 50ae166

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

targets/tanmatsu/badge_bsp_audio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "es8156.h"
1010
#include "esp_check.h"
1111
#include "esp_err.h"
12-
#include "freertos/projdefs.h"
1312
#include "tanmatsu_coprocessor.h"
1413
#include "tanmatsu_hardware.h"
1514

@@ -99,7 +98,9 @@ esp_err_t bsp_audio_set_amplifier(bool enable) {
9998
}
10099

101100
esp_err_t bsp_audio_get_i2s_handle(i2s_chan_handle_t* out_handle) {
102-
ESP_RETURN_ON_ERROR(ESP_ERR_INVALID_ARG, TAG, "Invalid argument");
101+
if (out_handle == NULL) {
102+
return ESP_ERR_INVALID_ARG;
103+
}
103104
*out_handle = i2s_handle;
104105
return ESP_OK;
105106
}

0 commit comments

Comments
 (0)