]> granicus.if.org Git - esp-idf/commitdiff
component/bt : cleanup the spell && redundant
authorTian Hao <tianhao@espressif.com>
Mon, 28 Nov 2016 06:58:30 +0000 (14:58 +0800)
committerTian Hao <tianhao@espressif.com>
Mon, 28 Nov 2016 06:58:30 +0000 (14:58 +0800)
21 files changed:
components/bt/bluedroid/api/esp_app_sec.c [deleted file]
components/bt/bluedroid/api/esp_gap_ble_api.c
components/bt/bluedroid/api/esp_gap_bt_api.c [deleted file]
components/bt/bluedroid/api/esp_gattc_api.c
components/bt/bluedroid/api/esp_gatts_api.c
components/bt/bluedroid/api/esp_sdp_api.c [deleted file]
components/bt/bluedroid/api/include/esp_gap_ble_api.h
components/bt/bluedroid/api/include/esp_gap_bt_api.h [deleted file]
components/bt/bluedroid/api/include/esp_gattc_api.h
components/bt/bluedroid/api/include/esp_gatts_api.h
components/bt/bluedroid/api/include/esp_sdp_api.h [deleted file]
components/bt/bluedroid/api/include/esp_sec_api.h [deleted file]
components/bt/bluedroid/bta/gatt/bta_gattc_api.c
components/bt/bluedroid/bta/gatt/bta_gatts_act.c
components/bt/bluedroid/bta/gatt/bta_gatts_api.c
components/bt/bluedroid/bta/include/bta_gatt_api.h
components/bt/bluedroid/btc/profile/std/gap/btc_gap_bt.c [deleted file]
components/bt/bluedroid/stack/btm/btm_ble_bgconn.c
components/bt/bluedroid/stack/gatt/att_protocol.c
components/bt/bluedroid/stack/include/btm_ble_api.h
examples/12_blufi/main/demo_main.c

diff --git a/components/bt/bluedroid/api/esp_app_sec.c b/components/bt/bluedroid/api/esp_app_sec.c
deleted file mode 100644 (file)
index e1ec079..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <stdlib.h>        // standard library
-#include <string.h>
-
-#include "esp_sec_api.h"
-
-
-extern void srand (unsigned int seed);
-extern int random (void);
-
-/// Application Security Environment Structure
-tAPP_SEC_ENV app_sec_env;
-
-
-/*******************************************************************************
-**
-** Function         app_ble_sec_gen_tk
-**
-** Description      This function is called to generate the ble tk
-**
-** Returns          the generate tk value
-**
-*******************************************************************************/
-UINT32 app_ble_sec_gen_tk(void)
-{
-    // Generate a PIN Code (Between 100000 and 999999)
-    return (100000 + (random() % 900000));
-}
-
-/*******************************************************************************
-**
-** Function         app_ble_sec_gen_ltk
-**
-** Description      This function is called to generate the ble ltk
-**
-** Returns          NULL
-**
-*******************************************************************************/
-void app_ble_sec_gen_ltk(UINT8 key_size)
-{
-    // Counter
-    UINT8 i;
-    app_sec_env.key_size = key_size;
-
-    // Randomly generate the LTK and the Random Number
-    for (i = 0; i < RAND_NB_LEN; i++) {
-        app_sec_env.rand_nb.nb[i] = random() % 256;
-    }
-
-    // Randomly generate the end of the LTK
-    for (i = 0; i < SEC_KEY_LEN; i++) {
-        app_sec_env.ltk.key[i] = (((key_size) < (16 - i)) ? 0 : random() % 256);
-    }
-
-    // Randomly generate the EDIV
-    app_sec_env.ediv = random() % 65536;
-}
-
-
-/*******************************************************************************
-**
-** Function         app_ble_sec_init
-**
-** Description      This function is init the security env and function
-**
-** Returns          NULL
-**
-*******************************************************************************/
-void app_ble_sec_init()
-{
-    // Reset Security Environment
-    memset(&app_sec_env, 0, sizeof(app_sec_env));
-}
-
-
-/*******************************************************************************
-**
-** Function         app_ble_security_start
-**
-** Description      This function is called by the slave when the seurity start
-**
-** Returns          NULL
-**
-*******************************************************************************/
-void app_ble_security_start(void)
-{
-
-}
-
-
-
-
-
index 7f4950a9f244307bb7fa9886dfdb0aabaf1680ac..de1d29f82e268105d916cca6f36938bad64a15db 100644 (file)
@@ -172,7 +172,7 @@ esp_err_t esp_ble_gap_config_local_privacy (bool privacy_enable)
     return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gap_args_t), NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
 }
 
-esp_err_t esp_ble_gap_set_device_name(char *name)
+esp_err_t esp_ble_gap_set_device_name(const char *name)
 {
     btc_msg_t msg;
     btc_ble_gap_args_t arg;
diff --git a/components/bt/bluedroid/api/esp_gap_bt_api.c b/components/bt/bluedroid/api/esp_gap_bt_api.c
deleted file mode 100644 (file)
index 179832a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "esp_gap_bt_api.h"
-#include "bta_api.h"
-#include "bt_trace.h"
-
index c59e94ad925b7cffab1d3c71f2d093ee17e0a2fb..88e7a627f48f320d5eb6e6393150bfda0114c862 100644 (file)
@@ -125,7 +125,7 @@ esp_err_t esp_ble_gattc_open(esp_gatt_if_t gatt_if, esp_bd_addr_t remote_bda, bo
 **
 ** @brief           Close a connection to a GATT server.
 **
-** @param[in]       conn_id: connectino ID to be closed.
+** @param[in]       conn_id: connection ID to be closed.
 **
 ** @return          ESP_OK - success, other - failed
 **
@@ -343,8 +343,8 @@ esp_err_t esp_ble_gattc_get_included_service(uint16_t conn_id,
 ** @brief           This function is called to read a service's characteristics of
 **                  the given characteritisc ID.UTH_REQ_NO_SCATTERNET
 **
-** @param[in]       conn_id - connectino ID.
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       conn_id - connection ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       char_id - characteritic ID to read.
 ** @param[in]       auth_req - authenticate request type
 **
@@ -375,7 +375,7 @@ esp_err_t esp_ble_gattc_read_char (uint16_t conn_id, esp_gatt_srvc_id_t *srvc_id
 ** @brief           This function is called to read a characteristics descriptor.
 **
 ** @param[in]       conn_id - connection ID.
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       descr_id - characteritic descriptor ID to read.
 ** @param[in]       auth_req - authenticate request type
 **
@@ -410,7 +410,7 @@ esp_err_t esp_ble_gattc_read_char_descr (uint16_t conn_id,
 ** @brief           This function is called to write characteristic value.
 **
 ** @param[in]       conn_id - connection ID.
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       char_id - characteristic ID to write.
 ** @param[in]       value_len: length of the value to be written.
 ** @param[in]       value - the value to be written.
@@ -448,7 +448,7 @@ esp_err_t esp_ble_gattc_write_char( uint16_t conn_id,
 ** @brief           This function is called to write characteristic descriptor value.
 **
 ** @param[in]       conn_id - connection ID
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       char_id - characteristic ID.
 ** @param[in]       descr_id - characteristic descriptor ID to write.
 ** @param[in]       value_len: length of the value to be written.
index 3004ee8beb54ef38cccb625c98f097acb51e7e3b..047c48c074a6d2489655a2de85d27a17fc4338d2 100644 (file)
@@ -73,7 +73,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatt_if,
 }
 
 
-esp_err_t esp_ble_gatts_add_include_service(uint16_t service_handle, uint16_t included_service_handle)
+esp_err_t esp_ble_gatts_add_included_service(uint16_t service_handle, uint16_t included_service_handle)
 {
     btc_msg_t msg;
     btc_ble_gatts_args_t arg;
diff --git a/components/bt/bluedroid/api/esp_sdp_api.c b/components/bt/bluedroid/api/esp_sdp_api.c
deleted file mode 100644 (file)
index 382f6dc..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "esp_sdp_api.h"
-
-
-esp_err_t esp_bt_sdp_enable(bt_sdp_cb_t *cback)
-{
-    tBTA_SDP_STATUS status = BTA_SdpEnable((tBTA_SDP_DM_CBACK *)cback);
-
-    return (status == BTA_SDP_SUCCESS) ? ESP_OK : ESP_FAIL;
-}
-
-esp_err_t esp_bt_sdp_search(esp_bd_addr_t bd_addr, esp_bt_uuid_t *uuid)
-{
-    tBTA_SDP_STATUS status = BTA_SdpSearch(bd_addr, (tSDP_UUID *)uuid);
-    return (status == BTA_SDP_SUCCESS) ? ESP_OK : ESP_FAIL;
-}
-
-esp_err_t esp_bt_sdp_create_record_by_user(void *user_data)
-{
-    tBTA_SDP_STATUS status = BTA_SdpCreateRecordByUser(user_data);
-    return (status == BTA_SDP_SUCCESS) ? ESP_OK : ESP_FAIL;
-}
-
-esp_err_t esp_bt_sdp_remove_record_by_user(void *user_data)
-{
-    tBTA_SDP_STATUS status = BTA_SdpRemoveRecordByUser(user_data);
-    return (status == BTA_SDP_SUCCESS) ? ESP_OK : ESP_FAIL;
-}
-
-
-/**********************************************************************************************/
-/**********************************************************************************************/
-/* API into SDP for local service database updates */
-/* these APIs are indended to be called in callback function in the context of stack task,
- * to handle BT_SDP_CREATE_RECORD_USER_EVT and BT_SDP_REMOVE_RECORD_USER_EVT
- */
-uint32_t esp_bt_sdp_create_record(void)
-{
-    return SDP_CreateRecord();
-}
-
-bool esp_bt_sdp_delete_record(uint32_t handle)
-{
-    return SDP_DeleteRecord(handle);
-}
-
-int32_t esp_bt_sdp_read_record(uint32_t handle, uint8_t *data, int32_t *data_len)
-{
-    return SDP_ReadRecord(handle, data, data_len);
-}
-
-bool esp_bt_sdp_add_attribute (uint32_t handle, uint16_t attr_id,
-                               uint8_t attr_type, uint32_t attr_len,
-                               uint8_t *p_val)
-{
-    return SDP_AddAttribute(handle, attr_id, attr_type, attr_len, p_val);
-}
-
-bool esp_bt_sdp_add_sequence (uint32_t handle,  uint16_t attr_id,
-                              uint16_t num_elem, uint8_t type[],
-                              uint8_t len[], uint8_t *p_val[])
-{
-    return SDP_AddSequence(handle, attr_id, num_elem, type, len, p_val);
-}
-
-bool esp_bt_sdp_add_uuid_sequence (uint32_t handle,  uint16_t attr_id,
-                                   uint16_t num_uuids, uint16_t *p_uuids)
-{
-    return SDP_AddUuidSequence(handle, attr_id, num_uuids, p_uuids);
-}
-
-
-bool esp_bt_sdp_add_protocol_list (uint32_t handle, uint16_t num_elem,
-                                   sdp_proto_elem_t *p_elem_list)
-{
-    return SDP_AddProtocolList(handle, num_elem, (tSDP_PROTOCOL_ELEM *)p_elem_list);
-}
-
-bool esp_bt_sdp_add_addition_protocol_lists(uint32_t handle, uint16_t num_elem,
-        sdp_proto_list_elem_t *p_proto_list)
-{
-    return SDP_AddAdditionProtoLists(handle, num_elem, (tSDP_PROTO_LIST_ELEM *)p_proto_list);
-}
-
-bool esp_bt_sdp_add_profile_dscp_list (uint32_t handle,
-                                       uint16_t profile_uuid,
-                                       uint16_t version)
-{
-    return SDP_AddProfileDescriptorList(handle, profile_uuid, version);
-}
-
-bool esp_bt_sdp_add_lang_base_attr_id_list(uint32_t handle,
-        uint16_t lang, uint16_t char_enc,
-        uint16_t base_id)
-{
-    return SDP_AddLanguageBaseAttrIDList(handle, lang, char_enc, base_id);
-}
-
-bool esp_bt_sdp_add_service_class_id_list(uint32_t handle,
-        uint16_t num_services,
-        uint16_t *p_service_uuids)
-{
-    return SDP_AddServiceClassIdList(handle, num_services, p_service_uuids);
-}
-
-bool esp_bt_sdp_delete_attribute(uint32_t handle, uint16_t attr_id)
-{
-    return SDP_DeleteAttribute(handle, attr_id);
-}
-
-/**********************************************************************************************/
-/**********************************************************************************************/
index 08190eec82838a339f834a42c4359f3cd6ff13e2..6c988ec957aec9eb7d7b460ec8de29ab23f28293 100644 (file)
@@ -369,7 +369,7 @@ esp_err_t esp_ble_gap_config_local_privacy (bool privacy_enable);
 ** @return          ESP_OK - success, other - failed
 **
 *******************************************************************************/
-esp_err_t esp_ble_gap_set_device_name(char *name);
+esp_err_t esp_ble_gap_set_device_name(const char *name);
 
 
 /*******************************************************************************
@@ -385,6 +385,6 @@ esp_err_t esp_ble_gap_set_device_name(char *name);
 ** @return               pointer of ADV data
 **
 *******************************************************************************/
-uint8_t *esp_ble_resolve_adv_data( uint8_t *p_adv, uint8_t type, uint8_t *p_length );
+uint8_t *esp_ble_resolve_adv_data(uint8_t *p_adv, uint8_t type, uint8_t *p_length);
 
 #endif /* __ESP_GAP_BLE_API_H__ */
diff --git a/components/bt/bluedroid/api/include/esp_gap_bt_api.h b/components/bt/bluedroid/api/include/esp_gap_bt_api.h
deleted file mode 100644 (file)
index 6b958a8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef __ESP_GAP_BT_API_H__
-#define __ESP_GAP_BT_API_H__
-
-#include <stdint.h>
-
-#include "esp_err.h"
-#include "esp_bt_defs.h"
-
-typedef enum {
-    BT_SCAN_MODE_NONE = 0,
-    BT_SCAN_MODE_CONNECTABLE,
-    BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE
-} bt_scan_mode_t;
-
-esp_err_t esp_bt_gap_set_scan_mode(bt_scan_mode_t mode);
-
-#endif /* __ESP_GAP_BT_API_H__ */
index 5b5fff5fb75693cfa642f3cd8fcc8744a244de39..6eaff28cc4f3dab900a372f17dcda555ddcb1554 100644 (file)
@@ -274,7 +274,7 @@ esp_err_t esp_ble_gattc_open(esp_gatt_if_t gatt_if, esp_bd_addr_t remote_bda, bo
 **
 ** @brief           Close a connection to a GATT server.
 **
-** @param[in]       conn_id: connectino ID to be closed.
+** @param[in]       conn_id: connection ID to be closed.
 **
 ** @return          ESP_OK - success, other - failed
 **
@@ -387,8 +387,8 @@ esp_err_t esp_ble_gattc_get_included_service(uint16_t conn_id,
 ** @brief           This function is called to read a service's characteristics of
 **                  the given characteritisc ID.UTH_REQ_NO_SCATTERNET
 **
-** @param[in]       conn_id - connectino ID.
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       conn_id - connection ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       char_id - characteritic ID to read.
 ** @param[in]       auth_req - authenticate request type
 **
@@ -409,7 +409,7 @@ esp_err_t esp_ble_gattc_read_char (uint16_t conn_id,
 ** @brief           This function is called to read a characteristics descriptor.
 **
 ** @param[in]       conn_id - connection ID.
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       descr_id - characteritic descriptor ID to read.
 ** @param[in]       auth_req - authenticate request type
 **
@@ -430,7 +430,7 @@ esp_err_t esp_ble_gattc_read_char_descr (uint16_t conn_id,
 ** @brief           This function is called to write characteristic value.
 **
 ** @param[in]       conn_id - connection ID.
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       char_id - characteristic ID to write.
 ** @param[in]       value_len: length of the value to be written.
 ** @param[in]       value - the value to be written.
@@ -453,7 +453,7 @@ esp_err_t esp_ble_gattc_write_char( uint16_t conn_id,
 ** @brief           This function is called to write characteristic descriptor value.
 **
 ** @param[in]       conn_id - connection ID
-** @param[in]       srvc_id - serivcie ID.
+** @param[in]       srvc_id - service ID.
 ** @param[in]       char_id - characteristic ID.
 ** @param[in]       descr_id - characteristic descriptor ID to write.
 ** @param[in]       value_len: length of the value to be written.
index c2420379d3d8ea45eb53b5b5b9156ed65fcbb963..750aba0d35caca23dcb30e53af330b3a9ec24fc0 100644 (file)
@@ -193,7 +193,7 @@ esp_err_t esp_ble_gatts_register_callback(esp_profile_cb_t callback);
 **
 ** @function        esp_ble_gatts_app_register
 **
-** @brief           This function is called to register application identity
+** @brief           This function is called to register application identifier
 **
 **
 ** @return          ESP_OK - success, other - failed
@@ -241,7 +241,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatt_if,
 
 /*******************************************************************************
 **
-** @function        esp_ble_gatts_add_include_service
+** @function        esp_ble_gatts_add_included_service
 **
 ** @brief           This function is called to add an included service. After included
 **                  service is included, a callback event BTA_GATTS_ADD_INCL_SRVC_EVT
@@ -254,7 +254,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatt_if,
 ** @return          ESP_OK - success, other - failed
 **
 *******************************************************************************/
-esp_err_t esp_ble_gatts_add_include_service(uint16_t service_handle, uint16_t included_service_handle);
+esp_err_t esp_ble_gatts_add_included_service(uint16_t service_handle, uint16_t included_service_handle);
 
 
 
@@ -407,7 +407,7 @@ esp_err_t esp_ble_gatts_open(esp_gatt_if_t gatt_if, esp_bd_addr_t remote_bda, bo
 **
 ** @brief           Close a connection  a remote device.
 **
-** @param[in]       conn_id: connectino ID to be closed.
+** @param[in]       conn_id: connection ID to be closed.
 **
 ** @return          ESP_OK - success, other - failed
 **
diff --git a/components/bt/bluedroid/api/include/esp_sdp_api.h b/components/bt/bluedroid/api/include/esp_sdp_api.h
deleted file mode 100644 (file)
index 81add1e..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef __ESP_SDP_API_H__
-#define __ESP_SDP_API_H__
-
-#include <stdint.h>
-#include "esp_err.h"
-#include "esp_bt_defs.h"
-#include "bta_sdp_api.h"
-#include "bt_sdp.h"
-
-#define BT_SDP_STAT_SUCCESS                      BTA_SDP_SUCCESS
-#define BT_SDP_STAT_FAILURE                      BTA_SDP_FAILURE
-#define BT_SDP_STAT_BUSY                         BTA_SDP_BUSY
-
-#define BT_SDP_ENABLE_EVT                        BTA_SDP_ENABLE_EVT
-#define BT_SDP_SEARCH_EVT                        BTA_SDP_SEARCH_EVT
-#define BT_SDP_SEARCH_COMP_EVT                   BTA_SDP_SEARCH_COMP_EVT
-#define BT_SDP_CREATE_RECORD_USER_EVT            BTA_SDP_CREATE_RECORD_USER_EVT
-#define BT_SDP_REMOVE_RECORD_USER_EVT            BTA_SDP_REMOVE_RECORD_USER_EVT
-#define BT_SDP_MAX_EVT                           BTA_SDP_MAX_EVT
-
-#define BT_SDP_MAX_RECORDS                       BTA_SDP_MAX_RECORDS
-
-typedef tBTA_SDP_STATUS bt_sdp_status_t;
-
-typedef tBTA_SDP_EVT bt_sdp_evt_t;
-
-typedef bluetooth_sdp_record bt_sdp_record_t;
-
-/* tBTA_SEARCH_COMP, bta_sdp_api.h */
-typedef struct {
-    bt_sdp_status_t status;
-    esp_bd_addr_t remote_addr;
-    esp_bt_uuid_t uuid;
-    int record_count;
-    bt_sdp_record_t records[BT_SDP_MAX_RECORDS];
-} bt_sdp_search_comp_t;
-
-/* tBTA_SDP, bta_sdp_api.h */
-typedef union {
-    bt_sdp_status_t status;
-    bt_sdp_search_comp_t sdp_search_comp;
-} bt_sdp_t;
-
-typedef void (bt_sdp_cb_t)(bt_sdp_evt_t event, bt_sdp_t *p_data, void *user_data);
-
-esp_err_t esp_bt_sdp_enable(bt_sdp_cb_t *cback);
-
-esp_err_t esp_bt_sdp_search(esp_bd_addr_t bd_addr, esp_bt_uuid_t *uuid);
-
-esp_err_t esp_bt_sdp_create_record_by_user(void *user_data);
-
-esp_err_t esp_bt_sdp_remove_record_by_user(void *user_data);
-
-
-/**********************************************************************************************/
-/**********************************************************************************************/
-/* API into SDP for local service database updates
- * these APIs are indended to be called in callback function in the context of stack task,
- * to handle BT_SDP_CREATE_RECORD_USER_EVT and BT_SDP_REMOVE_RECORD_USER_EVT
- */
-
-/* This structure is used to add protocol lists and find protocol elements */
-#define  ESP_BT_SDP_MAX_PROTOCOL_PARAMS         SDP_MAX_PROTOCOL_PARAMS     // bt_target.h
-typedef struct {
-    uint16_t      protocol_uuid;
-    uint16_t      num_params;
-    uint16_t      params[ESP_BT_SDP_MAX_PROTOCOL_PARAMS];
-} sdp_proto_elem_t; // tSDP_PROTOCOL_ELEM, sdp_api.h
-
-#define ESP_BT_SDP_MAX_LIST_ELEMS               SDP_MAX_LIST_ELEMS // sdp_api.h
-typedef struct {
-    uint16_t              num_elems;
-    sdp_proto_elem_t      list_elem[ESP_BT_SDP_MAX_LIST_ELEMS];
-} sdp_proto_list_elem_t; // tSDP_PROTO_LIST_ELEM, sdp_api.h
-
-
-uint32_t esp_bt_sdp_create_record(void);
-
-bool esp_bt_sdp_delete_record(uint32_t handle);
-
-int32_t esp_bt_sdp_read_record(uint32_t handle, uint8_t *data, int32_t *data_len);
-
-bool esp_bt_sdp_add_attribute (uint32_t handle, uint16_t attr_id,
-                               uint8_t attr_type, uint32_t attr_len,
-                               uint8_t *p_val);
-
-bool esp_bt_sdp_add_sequence (uint32_t handle,  uint16_t attr_id,
-                              uint16_t num_elem, uint8_t type[],
-                              uint8_t len[], uint8_t *p_val[]);
-
-bool esp_bt_sdp_add_uuid_sequence (uint32_t handle,  uint16_t attr_id,
-                                   uint16_t num_uuids, uint16_t *p_uuids);
-
-
-bool esp_bt_sdp_add_protocol_list (uint32_t handle, uint16_t num_elem,
-                                   sdp_proto_elem_t *p_elem_list);
-
-bool esp_bt_sdp_add_addition_protocol_lists(uint32_t handle, uint16_t num_elem,
-        sdp_proto_list_elem_t *p_proto_list);
-
-bool esp_bt_sdp_add_profile_dscp_list (uint32_t handle,
-                                       uint16_t profile_uuid,
-                                       uint16_t version);
-
-bool esp_bt_sdp_add_lang_base_attr_id_list(uint32_t handle,
-        uint16_t lang, uint16_t char_enc,
-        uint16_t base_id);
-
-bool esp_bt_sdp_add_service_class_id_list(uint32_t handle,
-        uint16_t num_services,
-        uint16_t *p_service_uuids);
-
-bool esp_bt_sdp_delete_attribute(uint32_t handle, uint16_t attr_id);
-
-#endif /* __ESP_SDP_API_H__ */
diff --git a/components/bt/bluedroid/api/include/esp_sec_api.h b/components/bt/bluedroid/api/include/esp_sec_api.h
deleted file mode 100644 (file)
index f9b0f9e..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef __ESP_SEC_API_H__
-#define __ESP_SEC_API_H__
-
-#include "bt_types.h"
-
-#define APP_SEC_IRK_FLAG        (0)
-#define RAND_NB_LEN         0x08
-#define SEC_KEY_LEN         0x10
-
-/*
- * STRUCTURES DEFINITIONS
- ****************************************************************************************
- */
-
-
-/// Generic Security key structure
-typedef struct {
-    /// Key value MSB -> LSB
-    UINT8 key[SEC_KEY_LEN];
-} smp_sec_key;
-
-///Random number structure
-typedef struct {
-    ///8-byte array for random number
-    UINT8     nb[RAND_NB_LEN];
-} rand_nb;
-
-typedef struct {
-    // LTK
-    smp_sec_key ltk;
-    // Random Number
-    rand_nb rand_nb;
-    // EDIV
-    UINT16 ediv;
-    // LTK key size
-    UINT8 key_size;
-
-    // Last paired peer address type
-    UINT8 peer_addr_type;
-    // Last paired peer address
-    BD_ADDR peer_addr;
-
-    // authentication level
-    UINT8 auth;
-
-} tAPP_SEC_ENV;
-
-extern tAPP_SEC_ENV app_sec_env;
-
-/*
-* GLOBAL FUNCTIONS DECLARATIONS
-****************************************************************************************
-*/
-
-void app_ble_sec_init(void);
-
-void app_ble_sec_pairing_cmp_evt_send(UINT8);
-
-UINT32 app_ble_sec_gen_tk(void);
-
-void app_ble_sec_gen_ltk(UINT8 key_size);
-
-void app_ble_security_start(void);
-
-#endif /* __ESP_SEC_API_H__ */
index 628b83b51b5ff58ee643f2a432ee5f2243ee13cc..b791538d7846569ac078325877407528284a6a1f 100644 (file)
@@ -196,7 +196,7 @@ void BTA_GATTC_CancelOpen(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, BOOLEAN i
 **
 ** Description      Close a connection to a GATT server.
 **
-** Parameters       conn_id: connectino ID to be closed.
+** Parameters       conn_id: connection ID to be closed.
 **
 ** Returns          void
 **
@@ -542,7 +542,7 @@ tBTA_GATT_STATUS  BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
 ** Description      This function is called to read a service's characteristics of
 **                    the given characteritisc ID.
 **
-** Parameters       conn_id - connectino ID.
+** Parameters       conn_id - connection ID.
 **                    p_char_id - characteritic ID to read.
 **
 ** Returns          None
@@ -613,7 +613,7 @@ void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
 ** Description      This function is called to read multiple characteristic or
 **                  characteristic descriptors.
 **
-** Parameters       conn_id - connectino ID.
+** Parameters       conn_id - connection ID.
 **                    p_read_multi - pointer to the read multiple parameter.
 **
 ** Returns          None
index 71971202200315b99ac8cd7d56b0dd4656c46eb4..aa00bf287dbad6571e8e1163b3238b86d25410e5 100644 (file)
@@ -818,7 +818,7 @@ static void bta_gatts_send_request_cback (UINT16 conn_id,
             APPL_TRACE_ERROR("connection request on gatt_if[%d] is not interested", gatt_if);
         }
     } else {
-        APPL_TRACE_ERROR("request received on unknown connectino ID: %d", conn_id);
+        APPL_TRACE_ERROR("request received on unknown connection ID: %d", conn_id);
     }
 }
 
index 757ab8ff08d882b219d04c56226cf51f625274d6..d54935120c1c71f89a339c365f665e6ff22d807d 100644 (file)
@@ -501,7 +501,7 @@ void BTA_GATTS_CancelOpen(tBTA_GATTS_IF server_if, BD_ADDR remote_bda, BOOLEAN i
 **
 ** Description      Close a connection  a remote device.
 **
-** Parameters       conn_id: connectino ID to be closed.
+** Parameters       conn_id: connection ID to be closed.
 **
 ** Returns          void
 **
index 446c4bb3ae686f79a7d02e7e9cbfbcd4a4ac34a7..d10ca46aeea79154cd09a74d9af5903686077ccf 100644 (file)
@@ -679,7 +679,7 @@ extern void BTA_GATTC_CancelOpen(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, BO
 **
 ** Description      Close a connection to a GATT server.
 **
-** Parameters       conn_id: connectino ID to be closed.
+** Parameters       conn_id: connection ID to be closed.
 **
 ** Returns          void
 **
@@ -850,7 +850,7 @@ extern tBTA_GATT_STATUS  BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
 ** Description      This function is called to read a service's characteristics of
 **                    the given characteritisc ID.
 **
-** Parameters       conn_id - connectino ID.
+** Parameters       conn_id - connection ID.
 **                    p_char_id - characteritic ID to read.
 **
 ** Returns          None
@@ -1010,7 +1010,7 @@ extern void BTA_GATTC_ExecuteWrite  (UINT16 conn_id, BOOLEAN is_execute);
 ** Description      This function is called to read multiple characteristic or
 **                  characteristic descriptors.
 **
-** Parameters       conn_id - connectino ID.
+** Parameters       conn_id - connection ID.
 **                    p_read_multi - read multiple parameters.
 **
 ** Returns          None
@@ -1337,7 +1337,7 @@ extern void BTA_GATTS_CancelOpen(tBTA_GATTS_IF server_if, BD_ADDR remote_bda, BO
 **
 ** Description      Close a connection  a remote device.
 **
-** Parameters       conn_id: connectino ID to be closed.
+** Parameters       conn_id: connection ID to be closed.
 **
 ** Returns          void
 **
diff --git a/components/bt/bluedroid/btc/profile/std/gap/btc_gap_bt.c b/components/bt/bluedroid/btc/profile/std/gap/btc_gap_bt.c
deleted file mode 100644 (file)
index 52551ec..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "esp_gap_bt_api.h"
-#include "bta_api.h"
-#include "bt_trace.h"
-
-esp_err_t esp_bt_gap_set_scan_mode(bt_scan_mode_t mode)
-{
-    tBTA_DM_DISC disc_mode;
-    tBTA_DM_CONN conn_mode;
-
-    switch (mode) {
-    case BT_SCAN_MODE_NONE:
-        disc_mode = BTA_DM_NON_DISC;
-        conn_mode = BTA_DM_NON_CONN;
-        break;
-
-    case BT_SCAN_MODE_CONNECTABLE:
-        disc_mode = BTA_DM_NON_DISC;
-        conn_mode = BTA_DM_CONN;
-        break;
-
-    case BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE:
-        disc_mode = BTA_DM_GENERAL_DISC;
-        conn_mode = BTA_DM_CONN;
-        break;
-
-    default:
-        // BTIF_TRACE_ERROR("invalid scan mode (0x%x)", mode);
-        return ESP_ERR_INVALID_ARG;
-    }
-
-    // BTIF_TRACE_EVENT("set property scan mode : %x", mode);
-    BTA_DmSetVisibility(disc_mode, conn_mode, BTA_DM_IGNORE, BTA_DM_IGNORE);
-
-    return ESP_OK;
-}
index f53f71a5d4fc8d5c57f318e0c56970dee35babee..af89677ee29c43b47b6850814062eb857f98b6e4 100644 (file)
@@ -441,7 +441,7 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
 **                  p_select_cback: callback function to return application
 **                                  selection.
 **
-** Returns          BOOLEAN: selective connectino procedure is started.
+** Returns          BOOLEAN: selective connection procedure is started.
 **
 *******************************************************************************/
 BOOLEAN btm_ble_start_select_conn(BOOLEAN start, tBTM_BLE_SEL_CBACK *p_select_cback)
@@ -523,7 +523,7 @@ BOOLEAN btm_ble_start_select_conn(BOOLEAN start, tBTM_BLE_SEL_CBACK *p_select_cb
 **                  p_select_cback: callback function to return application
 **                                  selection.
 **
-** Returns          BOOLEAN: selective connectino procedure is started.
+** Returns          BOOLEAN: selective connection procedure is started.
 **
 *******************************************************************************/
 void btm_ble_initiate_select_conn(BD_ADDR bda)
index 48ccfd49da311f54d7aaa97f5a289e8c283670d7..50150fa32a5dd0fab06115026fbcd398fa79c68a 100644 (file)
@@ -496,7 +496,7 @@ tGATT_STATUS attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code,
 ** Description      This function sends the client request or confirmation message
 **                  to server.
 **
-** Parameter        p_tcb: pointer to the connectino control block.
+** Parameter        p_tcb: pointer to the connection control block.
 **                  clcb_idx: clcb index
 **                  op_code: message op code.
 **                  p_msg: pointer to message parameters structure.
index 2c4d1f1d593f8a8402425d0868b409401959e9e3..c6ff1807611512ff789a21b282f85575f85a6a7c 100644 (file)
@@ -167,7 +167,7 @@ typedef UINT8   tBTM_BLE_SFP;
 #define BTM_BLE_CONN_INT_MIN_DEF     24      /* recommended min: 30ms  = 24 * 1.25 */
 #endif
 
-/* default connectino interval max */
+/* default connection interval max */
 #ifndef BTM_BLE_CONN_INT_MAX_DEF
 #define BTM_BLE_CONN_INT_MAX_DEF     40      /* recommended max: 50 ms = 56 * 1.25 */
 #endif
index 31a315d2187b513bd82d4a3f7d7f0c918b412e08..f1c38077410736d5aaf62208a7470f48e9b8b477 100644 (file)
@@ -127,7 +127,6 @@ void app_main()
     esp_err_t ret;
 
     nvs_flash_init();
-    system_init();
     initialise_wifi();
 
     //vTaskDelay(3000 / portTICK_PERIOD_MS);