]> granicus.if.org Git - esp-idf/commit
bt: call nvs_flash_init in examples, show error if NVS is not initialized
authorIvan Grokhotkov <ivan@espressif.com>
Thu, 13 Jul 2017 15:46:19 +0000 (23:46 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 17 Jul 2017 13:29:50 +0000 (21:29 +0800)
commit979fce0df55ffbc2fa487f3dbf693e1951abd417
treee180e67039c4aec192bc1fa2db1e5ab3efe73a7a
parent1ed4eadfab58a9e303f47ce6b1be0ec0381326b8
bt: call nvs_flash_init in examples, show error if NVS is not initialized

NVS is used to store PHY calibration data, WiFi configuration, and BT
configuration. Previously BT examples did not call nvs_flash_init,
relying on the fact that it is called during PHY init. However PHY init
did not handle possible NVS initialization errors.

This change moves PHY init procedure into the application, and adds
diagnostic messages to BT config management routines if NVS is not
initialized.
17 files changed:
components/bt/bluedroid/osi/config.c
components/esp32/phy_init.c
components/nvs_flash/include/nvs_flash.h
components/nvs_flash/src/nvs_api.cpp
examples/bluetooth/a2dp_sink/main/main.c
examples/bluetooth/ble_adv/main/app_bt.c
examples/bluetooth/blufi/main/blufi_example_main.c
examples/bluetooth/controller_hci_uart/main/controller_hci_uart_demo.c
examples/bluetooth/gatt_client/main/gattc_demo.c
examples/bluetooth/gatt_security_server/main/example_ble_sec_gatts_demo.c
examples/bluetooth/gatt_server/main/gatts_demo.c
examples/bluetooth/gatt_server_service_table/main/gatts_table_creat_demo.c
examples/storage/nvs_rw_blob/main/nvs_blob_example_main.c
examples/storage/nvs_rw_value/main/nvs_value_example_main.c
examples/system/ota/main/ota_example_main.c
examples/wifi/power_save/main/power_save.c
examples/wifi/wps/main/wps.c