Merge branch 'bugfix/btdm_xQueueGenericSend_assertion_3.0' into 'release/v3.0'
component/bt: Fix xQueueGenericSend assertion in release/v3.0 See merge request idf/esp-idf!2160
This commit is contained in:
commit
501640514a
2 changed files with 24 additions and 16 deletions
|
@ -141,9 +141,12 @@ int btc_init(void)
|
||||||
{
|
{
|
||||||
xBtcQueue = xQueueCreate(BTC_TASK_QUEUE_LEN, sizeof(btc_msg_t));
|
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);
|
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();
|
btc_gap_callback_init();
|
||||||
/* TODO: initial the profile_tab */
|
/* TODO: initial the profile_tab */
|
||||||
|
|
||||||
return BT_STATUS_SUCCESS;
|
return BT_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,10 @@ static struct alarm_t *alarm_cbs_lookfor_available(void)
|
||||||
static void alarm_cb_handler(struct alarm_t *alarm)
|
static void alarm_cb_handler(struct alarm_t *alarm)
|
||||||
{
|
{
|
||||||
LOG_DEBUG("TimerID %p\n", 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_msg_t msg;
|
||||||
btc_alarm_args_t arg;
|
btc_alarm_args_t arg;
|
||||||
msg.sig = BTC_SIG_API_CALL;
|
msg.sig = BTC_SIG_API_CALL;
|
||||||
|
@ -181,6 +185,7 @@ static osi_alarm_err_t alarm_free(osi_alarm_t *alarm)
|
||||||
return OSI_ALARM_ERR_INVALID_ARG;
|
return OSI_ALARM_ERR_INVALID_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_timer_stop(alarm->alarm_hdl);
|
||||||
esp_err_t stat = esp_timer_delete(alarm->alarm_hdl);
|
esp_err_t stat = esp_timer_delete(alarm->alarm_hdl);
|
||||||
if (stat != ESP_OK) {
|
if (stat != ESP_OK) {
|
||||||
LOG_ERROR("%s failed to delete timer, err 0x%x\n", __func__, stat);
|
LOG_ERROR("%s failed to delete timer, err 0x%x\n", __func__, stat);
|
||||||
|
|
Loading…
Reference in a new issue