component/bt: modify the init/deinit function

This commit is contained in:
wangmengyang 2017-02-24 20:39:41 +08:00
parent c7dac035ae
commit 667ac172df

View file

@ -16,6 +16,7 @@
#include "btc_main.h"
#include "future.h"
#include "esp_err.h"
#include "btif_config.h"
static future_t *main_future[BTC_MAIN_FUTURE_NUM];
@ -60,6 +61,7 @@ void btc_init_callback(void)
static void btc_init_bluetooth(void)
{
btif_config_init();
bte_main_boot_entry(btc_init_callback);
}
@ -67,6 +69,7 @@ static void btc_init_bluetooth(void)
static void btc_deinit_bluetooth(void)
{
bte_main_shutdown();
btif_config_clean_up();
future_ready(*btc_main_get_future_p(BTC_MAIN_DEINIT_FUTURE), FUTURE_SUCCESS);
}