doc(ble/bluedroid): clarify callback notes to avoid time-consuming ops

(cherry picked from commit 4590b4bb34)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
This commit is contained in:
Zhang Hai Peng
2026-06-02 10:23:34 +08:00
parent 6c6a5ab648
commit 0c95d3abdb
3 changed files with 16 additions and 4 deletions
@@ -2902,7 +2902,11 @@ typedef void (* esp_gap_ble_cb_t)(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_p
*
* @param[in] callback: callback function
*
* @note Avoid performing time-consuming operations within the callback functions.
* @note Do NOT perform time-consuming operations in the callback. Time-consuming operations
* include: taking semaphores that may block for a long time (e.g. xSemaphoreTake with
* long timeout or portMAX_DELAY), blocking delays (e.g. vTaskDelay), and flash
* read/write/erase. Such operations may block the Bluetooth stack and lead to
* instability or deadlock. Defer heavy work to a separate task if needed.
*
* @return
* - ESP_OK : success
@@ -280,7 +280,11 @@ typedef void (* esp_gattc_cb_t)(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_
*
* @param[in] callback The pointer to the application callback function
*
* @note Avoid performing time-consuming operations within the callback functions.
* @note Do NOT perform time-consuming operations in the callback. Time-consuming operations
* include: taking semaphores that may block for a long time (e.g. xSemaphoreTake with
* long timeout or portMAX_DELAY), blocking delays (e.g. vTaskDelay), and flash
* read/write/erase. Such operations may block the Bluetooth stack and lead to
* instability or deadlock. Defer heavy work to a separate task if needed.
*
* @return
* - ESP_OK: Success
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -283,7 +283,11 @@ typedef void (* esp_gatts_cb_t)(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_
*
* @param[in] callback The pointer to the application callback function
*
* @note Avoid performing time-consuming operations within the callback functions.
* @note Do NOT perform time-consuming operations in the callback. Time-consuming operations
* include: taking semaphores that may block for a long time (e.g. xSemaphoreTake with
* long timeout or portMAX_DELAY), blocking delays (e.g. vTaskDelay), and flash
* read/write/erase. Such operations may block the Bluetooth stack and lead to
* instability or deadlock. Defer heavy work to a separate task if needed.
*
* @return
* - ESP_OK: Success