component/bt: move API to set device name that can be used by both bt and ble applications

This commit is contained in:
wangmengyang
2017-03-17 19:16:52 +08:00
parent 66fd3b9768
commit 1cf5a56896
13 changed files with 119 additions and 84 deletions

View File

@@ -24,8 +24,6 @@ extern "C" {
#endif
#define ESP_BT_GAP_DEVICE_NAME_MAX (32)
/// Discoverability and Connectability mode
typedef enum {
ESP_BT_SCAN_MODE_NONE = 0, /*!< Neither discoverable nor connectable */
@@ -47,22 +45,6 @@ typedef enum {
*/
esp_err_t esp_bt_gap_set_scan_mode(esp_bt_scan_mode_t mode);
/**
* @brief Set bluetooth device name. This function should be called after esp_bluedroid_enable()
* completes successfully
*
* @param[in] name : device name to be set, string length should not exceed ESP_BT_GAP_DEVICE_NAME_MAX
*
* @return
* - ESP_OK : Succeed
* - ESP_ERR_INVALID_ARG : if name is NULL pointer or empty, or string length out of limit
* - ESP_INVALID_STATE : if bluetooth stack is not yet enabled
* - ESP_FAIL : others
*/
esp_err_t esp_bt_gap_set_device_name(const char *name);
#ifdef __cplusplus
}
#endif