From 6743820bce3b512b797b0b28e12178338d9448ba Mon Sep 17 00:00:00 2001 From: baohongde Date: Wed, 23 Jan 2019 18:04:01 +0800 Subject: [PATCH] components/bt: Add precautions for esp_vhci_host_send_packet (backport 3.1) --- components/bt/include/esp_bt.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/bt/include/esp_bt.h b/components/bt/include/esp_bt.h index 06636d177..c3c1cb020 100644 --- a/components/bt/include/esp_bt.h +++ b/components/bt/include/esp_bt.h @@ -43,7 +43,7 @@ typedef struct { } esp_bt_controller_config_t; #ifdef CONFIG_BT_ENABLED -/* While scanning, if the free memory value in controller is less than SCAN_SEND_ADV_RESERVED_SIZE, +/* While scanning, if the free memory value in controller is less than SCAN_SEND_ADV_RESERVED_SIZE, the adv packet will be discarded until the memory is restored. */ #define SCAN_SEND_ADV_RESERVED_SIZE 1000 /* enable controller log debug when adv lost */ @@ -285,8 +285,12 @@ bool esp_vhci_host_check_send_available(void); /** @brief esp_vhci_host_send_packet * host send packet to controller + * + * Should not call this function from within a critical section + * or when the scheduler is suspended. + * * @param data the packet point - *,@param len the packet length + * @param len the packet length */ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len);