mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(bt/example): Fixed hf_ag build error
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "sdkconfig.h"
|
||||
#include "bt_app_core.h"
|
||||
#include "bt_app_hf.h"
|
||||
#include "osi/allocator.h"
|
||||
|
||||
const char *c_hf_evt_str[] = {
|
||||
"CONNECTION_STATE_EVT", /*!< SERVICE LEVEL CONNECTION STATE CONTROL */
|
||||
@@ -231,7 +230,7 @@ static void bt_app_send_data_task(void *arg)
|
||||
if (frame_data_num == 0) {
|
||||
continue;
|
||||
}
|
||||
buf = osi_malloc(frame_data_num);
|
||||
buf = (uint8_t *)malloc(frame_data_num);
|
||||
if (!buf) {
|
||||
ESP_LOGE(BT_HF_TAG, "%s, no mem", __FUNCTION__);
|
||||
continue;
|
||||
@@ -241,7 +240,7 @@ static void bt_app_send_data_task(void *arg)
|
||||
if (!done) {
|
||||
ESP_LOGE(BT_HF_TAG, "rb send fail");
|
||||
}
|
||||
osi_free(buf);
|
||||
free(buf);
|
||||
vRingbufferGetInfo(s_m_rb, NULL, NULL, NULL, NULL, &item_size);
|
||||
|
||||
if(s_audio_code == ESP_HF_AUDIO_STATE_CONNECTED_MSBC) {
|
||||
|
||||
Reference in New Issue
Block a user