mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-01 07:37:52 +00:00
remove breaking change
This commit is contained in:
committed by
Abhinav Kudnar
parent
238b96d3f7
commit
3d0022adcd
@@ -62,19 +62,14 @@ static struct ble_npl_eventq g_eventq_dflt;
|
||||
static struct ble_npl_sem ble_hs_stop_sem;
|
||||
static struct ble_npl_event ble_hs_ev_stop;
|
||||
|
||||
<<<<<<< HEAD
|
||||
extern void os_msys_init(void);
|
||||
extern void os_mempool_module_init(void);
|
||||
|
||||
void
|
||||
nimble_port_init(void)
|
||||
=======
|
||||
/**
|
||||
* Called when the host stop procedure has completed.
|
||||
*/
|
||||
static void
|
||||
ble_hs_stop_cb(int status, void *arg)
|
||||
>>>>>>> f8a79b04... Optimize the nimble host interface function and divide the host
|
||||
{
|
||||
ble_npl_sem_release(&ble_hs_stop_sem);
|
||||
}
|
||||
@@ -98,13 +93,10 @@ esp_err_t esp_nimble_init(void)
|
||||
|
||||
npl_freertos_mempool_init();
|
||||
|
||||
#if true //need delete esp_nimble_hci_and_controller_init then can be use
|
||||
if(esp_nimble_hci_init() != ESP_OK) {
|
||||
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "hci inits failed\n");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
printf("esp_nimble_hci_init\n");
|
||||
#endif
|
||||
|
||||
/* Initialize default event queue */
|
||||
ble_npl_eventq_init(&g_eventq_dflt);
|
||||
@@ -113,19 +105,10 @@ esp_err_t esp_nimble_init(void)
|
||||
os_msys_init();
|
||||
/* Initialize transport */
|
||||
ble_transport_init();
|
||||
#endif
|
||||
/* Initialize the host */
|
||||
ble_transport_hs_init();
|
||||
|
||||
#if NIMBLE_CFG_CONTROLLER
|
||||
#ifndef RIOT_VERSION
|
||||
hal_timer_init(5, NULL);
|
||||
os_cputime_init(32768);
|
||||
#endif
|
||||
ble_transport_ll_init();
|
||||
#endif
|
||||
|
||||
/* Initialize the host */
|
||||
ble_hs_init();
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -136,7 +119,7 @@ esp_err_t esp_nimble_init(void)
|
||||
*/
|
||||
esp_err_t esp_nimble_deinit(void)
|
||||
{
|
||||
#if !SOC_ESP_NIMBLE_CONTROLLER //need delete esp_nimble_hci_and_controller_init then can be use
|
||||
#if false && !SOC_ESP_NIMBLE_CONTROLLER //need delete esp_nimble_hci_and_controller_init then can be use
|
||||
if(esp_nimble_hci_deinit() != ESP_OK) {
|
||||
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "hci deinit failed\n");
|
||||
return ESP_FAIL;
|
||||
@@ -152,7 +135,7 @@ esp_err_t esp_nimble_deinit(void)
|
||||
void
|
||||
nimble_port_init(void)
|
||||
{
|
||||
#if CONFIG_BT_CONTROLLER_ENABLED
|
||||
#if SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED
|
||||
esp_bt_controller_config_t config_opts = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
|
||||
if(esp_bt_controller_init(&config_opts) != ESP_OK) {
|
||||
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "controller init failed\n");
|
||||
|
||||
Reference in New Issue
Block a user