mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
Merge branch 'bugfix/btdm_xQueueGenericSend_assertion' into 'master'
component/bt: Fix xQueueGenericSend assertion See merge request idf/esp-idf!2130
This commit is contained in:
@@ -160,9 +160,11 @@ int btc_init(void)
|
||||
{
|
||||
xBtcQueue = xQueueCreate(BTC_TASK_QUEUE_LEN, sizeof(btc_msg_t));
|
||||
xTaskCreatePinnedToCore(btc_task, "Btc_task", BTC_TASK_STACK_SIZE, NULL, BTC_TASK_PRIO, &xBtcTaskHandle, BTC_TASK_PINNED_TO_CORE);
|
||||
if (xBtcTaskHandle == NULL || xBtcQueue == 0){
|
||||
return BT_STATUS_NOMEM;
|
||||
}
|
||||
btc_gap_callback_init();
|
||||
/* TODO: initial the profile_tab */
|
||||
|
||||
return BT_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -123,6 +123,10 @@ static struct alarm_t *alarm_cbs_lookfor_available(void)
|
||||
static void alarm_cb_handler(struct alarm_t *alarm)
|
||||
{
|
||||
LOG_DEBUG("TimerID %p\n", alarm);
|
||||
if (alarm_state != ALARM_STATE_OPEN) {
|
||||
LOG_WARN("%s, invalid state %d\n", __func__, alarm_state);
|
||||
return;
|
||||
}
|
||||
btc_msg_t msg;
|
||||
btc_alarm_args_t arg;
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
@@ -181,7 +185,7 @@ static osi_alarm_err_t alarm_free(osi_alarm_t *alarm)
|
||||
LOG_ERROR("%s null\n", __func__);
|
||||
return OSI_ALARM_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
esp_timer_stop(alarm->alarm_hdl);
|
||||
esp_err_t stat = esp_timer_delete(alarm->alarm_hdl);
|
||||
if (stat != ESP_OK) {
|
||||
LOG_ERROR("%s failed to delete timer, err 0x%x\n", __func__, stat);
|
||||
|
Reference in New Issue
Block a user