mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
component/bt: modify the init/deinit function
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include "btc_main.h"
|
#include "btc_main.h"
|
||||||
#include "future.h"
|
#include "future.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
#include "btif_config.h"
|
||||||
|
|
||||||
static future_t *main_future[BTC_MAIN_FUTURE_NUM];
|
static future_t *main_future[BTC_MAIN_FUTURE_NUM];
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ void btc_init_callback(void)
|
|||||||
|
|
||||||
static void btc_init_bluetooth(void)
|
static void btc_init_bluetooth(void)
|
||||||
{
|
{
|
||||||
|
btif_config_init();
|
||||||
bte_main_boot_entry(btc_init_callback);
|
bte_main_boot_entry(btc_init_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,6 +69,7 @@ static void btc_init_bluetooth(void)
|
|||||||
static void btc_deinit_bluetooth(void)
|
static void btc_deinit_bluetooth(void)
|
||||||
{
|
{
|
||||||
bte_main_shutdown();
|
bte_main_shutdown();
|
||||||
|
btif_config_clean_up();
|
||||||
future_ready(*btc_main_get_future_p(BTC_MAIN_DEINIT_FUTURE), FUTURE_SUCCESS);
|
future_ready(*btc_main_get_future_p(BTC_MAIN_DEINIT_FUTURE), FUTURE_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user