mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
Nimble: Added return value (success / failure ) to nimble_port_init
This commit is contained in:
Submodule components/bt/host/nimble/nimble updated: 2412a15acc...f30278d3ab
@@ -35,8 +35,21 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void nimble_port_init(void);
|
||||
void nimble_port_deinit(void);
|
||||
/**
|
||||
* @brief nimble_port_init - Initialize controller and NimBLE host stack
|
||||
*
|
||||
* @return esp_err_t - ESP_OK ( if success)
|
||||
* Error code in case of failure
|
||||
*/
|
||||
esp_err_t nimble_port_init(void);
|
||||
|
||||
/**
|
||||
* @brief nimble_port_deinit - Deinitialize controller and NimBLE host stack
|
||||
*
|
||||
* @return esp_err_t - ESP_OK ( if success)
|
||||
* Error code in case of failure
|
||||
*/
|
||||
esp_err_t nimble_port_deinit(void);
|
||||
|
||||
void nimble_port_run(void);
|
||||
int nimble_port_stop(void);
|
||||
|
||||
@@ -494,7 +494,11 @@ static int simple_ble_start(const simple_ble_cfg_t *cfg)
|
||||
int rc;
|
||||
ESP_LOGD(TAG, "Free memory at start of simple_ble_init %" PRIu32, esp_get_free_heap_size());
|
||||
|
||||
nimble_port_init();
|
||||
rc = nimble_port_init();
|
||||
if (rc != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to init nimble %d ", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Initialize the NimBLE host configuration. */
|
||||
ble_hs_cfg.reset_cb = simple_ble_on_reset;
|
||||
|
||||
Reference in New Issue
Block a user