BT MAIN API

应用程序示例

Instructions

API 参考手册

类型定义

枚举

enum esp_bluedroid_status_t

Bluetooth stack status type, to indicate whether the bluetooth stack is ready.

Values:

ESP_BLUEDROID_STATUS_UNINITIALIZED = 0

Bluetooth not initialized

ESP_BLUEDROID_STATUS_INITIALIZED

Bluetooth initialized but not enabled

ESP_BLUEDROID_STATUS_ENABLED

Bluetooth initialized and enabled

结构体

函数

esp_bluedroid_status_t esp_bluedroid_get_status(void)

Get bluetooth stack status.

Return
Bluetooth stack status

esp_err_t esp_bluedroid_enable(void)

Enable bluetooth, must after esp_bluedroid_init()

Return
  • ESP_OK : Succeed
  • Other : Failed

esp_err_t esp_bluedroid_disable(void)

Disable bluetooth, must prior to esp_bluedroid_deinit()

Return
  • ESP_OK : Succeed
  • Other : Failed

esp_err_t esp_bluedroid_init(void)

Init and alloc the resource for bluetooth, must be prior to every bluetooth stuff.

Return
  • ESP_OK : Succeed
  • Other : Failed

esp_err_t esp_bluedroid_deinit(void)

Deinit and free the resource for bluetooth, must be after every bluetooth stuff.

Return
  • ESP_OK : Succeed
  • Other : Failed