diff --git a/components/bt/bluedroid/stack_api/bt_app_sec.c b/components/bt/bluedroid/api/esp_app_sec.c similarity index 99% rename from components/bt/bluedroid/stack_api/bt_app_sec.c rename to components/bt/bluedroid/api/esp_app_sec.c index fa4831650d..60d48bf046 100644 --- a/components/bt/bluedroid/stack_api/bt_app_sec.c +++ b/components/bt/bluedroid/api/esp_app_sec.c @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bt_app_sec.h" #include // standard library #include +#include "esp_sec_api.h" extern void srand (unsigned int seed); diff --git a/components/bt/bluedroid/stack_api/bt_gap_api.c b/components/bt/bluedroid/api/esp_gap_api.c similarity index 98% rename from components/bt/bluedroid/stack_api/bt_gap_api.c rename to components/bt/bluedroid/api/esp_gap_api.c index 65feb289bb..7313e4a177 100644 --- a/components/bt/bluedroid/stack_api/bt_gap_api.c +++ b/components/bt/bluedroid/api/esp_gap_api.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bt_gap_api.h" +#include "esp_gap_api.h" #include "bta_api.h" #include "bt_trace.h" diff --git a/components/bt/bluedroid/stack_api/bt_app_api.c b/components/bt/bluedroid/api/esp_gatt_api.c similarity index 99% rename from components/bt/bluedroid/stack_api/bt_app_api.c rename to components/bt/bluedroid/api/esp_gatt_api.c index 7b23880d1b..20e2b1ad46 100644 --- a/components/bt/bluedroid/stack_api/bt_app_api.c +++ b/components/bt/bluedroid/api/esp_gatt_api.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bt_app_api.h" +#include "esp_gatt_api.h" #include "btm_ble_api.h" //#include "btm_ble_int.h" diff --git a/components/bt/bluedroid/stack_api/bt_sdp_api.c b/components/bt/bluedroid/api/esp_sdp_api.c similarity index 99% rename from components/bt/bluedroid/stack_api/bt_sdp_api.c rename to components/bt/bluedroid/api/esp_sdp_api.c index 66330bb295..a649882263 100644 --- a/components/bt/bluedroid/stack_api/bt_sdp_api.c +++ b/components/bt/bluedroid/api/esp_sdp_api.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bt_sdp_api.h" +#include "esp_sdp_api.h" esp_err_t esp_bt_sdp_enable(bt_sdp_cb_t *cback) diff --git a/components/bt/bluedroid/stack_api/include/bt_api_common.h b/components/bt/bluedroid/api/include/esp_bt_common.h similarity index 66% rename from components/bt/bluedroid/stack_api/include/bt_api_common.h rename to components/bt/bluedroid/api/include/esp_bt_common.h index 7c4859db24..ea9404ff1d 100644 --- a/components/bt/bluedroid/stack_api/include/bt_api_common.h +++ b/components/bt/bluedroid/api/include/esp_bt_common.h @@ -1,5 +1,5 @@ -#ifndef __BT_API_COMMON_H__ -#define __BT_API_COMMON_H__ +#ifndef __ESP_BT_COMMON_H__ +#define __ESP_BT_COMMON_H__ #include @@ -10,4 +10,4 @@ typedef tBT_UUID esp_bt_uuid_t; /* tBT_UUID in "bt_types.h" */ typedef BD_ADDR esp_bd_addr_t; /* BD_ADDR in bt_types.h */ -#endif /* __BT_API_COMMON_H__ */ +#endif /* __ESP_BT_COMMON_H__ */ diff --git a/components/bt/bluedroid/stack_api/include/bt_app_defs.h b/components/bt/bluedroid/api/include/esp_bt_defs.h similarity index 99% rename from components/bt/bluedroid/stack_api/include/bt_app_defs.h rename to components/bt/bluedroid/api/include/esp_bt_defs.h index 91ecdcaf1e..a6fee49bc9 100644 --- a/components/bt/bluedroid/stack_api/include/bt_app_defs.h +++ b/components/bt/bluedroid/api/include/esp_bt_defs.h @@ -1,6 +1,5 @@ - -#ifndef _BT_APP_DEFS_H__ -#define _BT_APP_DEFS_H__ +#ifndef __ESP_BT_DEFS_H__ +#define __ESP_BT_DEFS_H__ #include "bta_api.h" @@ -329,4 +328,4 @@ extern void ble_set_scan_rsp(esp_ble_adv_data_cfg_t *scan_rsp_data, -#endif ///_BT_APP_DEFS_H__ \ No newline at end of file +#endif ///__ESP_BT_DEFS_H__ diff --git a/components/bt/bluedroid/stack_api/include/bt_gap_api.h b/components/bt/bluedroid/api/include/esp_gap_api.h similarity index 68% rename from components/bt/bluedroid/stack_api/include/bt_gap_api.h rename to components/bt/bluedroid/api/include/esp_gap_api.h index ac74996f5c..809da0a199 100644 --- a/components/bt/bluedroid/stack_api/include/bt_gap_api.h +++ b/components/bt/bluedroid/api/include/esp_gap_api.h @@ -1,10 +1,10 @@ -#ifndef __BT_GAP_API_H__ -#define __BT_GAP_API_H__ +#ifndef __ESP_GAP_API_H__ +#define __ESP_GAP_API_H__ #include #include "esp_err.h" -#include "bt_api_common.h" +#include "esp_bt_common.h" enum { BT_SCAN_MODE_NONE, @@ -15,4 +15,4 @@ typedef uint16_t bt_scan_mode_t; esp_err_t esp_bt_gap_set_scan_mode(bt_scan_mode_t mode); -#endif /* __BT_GAP_API_H__ */ +#endif /* __ESP_GAP_API_H__ */ diff --git a/components/bt/bluedroid/stack_api/include/bt_app_api.h b/components/bt/bluedroid/api/include/esp_gatt_api.h similarity index 98% rename from components/bt/bluedroid/stack_api/include/bt_app_api.h rename to components/bt/bluedroid/api/include/esp_gatt_api.h index fc557e3aa3..7a09921659 100644 --- a/components/bt/bluedroid/stack_api/include/bt_app_api.h +++ b/components/bt/bluedroid/api/include/esp_gatt_api.h @@ -1,19 +1,8 @@ -// 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_GATT_API_H__ +#define __ESP_GATT_API_H__ #include "bt_types.h" -#include "bt_app_defs.h" +#include "esp_bt_defs.h" #include "bta_gatt_api.h" #include "bt_prf_sys.h" @@ -921,4 +910,4 @@ void esp_ble_gatts_close(uint16_t conn_id); void esp_prf_app_register(uint8_t prf_id, void *p_cback); - +#endif /* __ESP_GATT_API_H__ */ diff --git a/components/bt/bluedroid/stack_api/include/bt_sdp_api.h b/components/bt/bluedroid/api/include/esp_sdp_api.h similarity index 93% rename from components/bt/bluedroid/stack_api/include/bt_sdp_api.h rename to components/bt/bluedroid/api/include/esp_sdp_api.h index a4b8f2d2a9..3b5b587ade 100644 --- a/components/bt/bluedroid/stack_api/include/bt_sdp_api.h +++ b/components/bt/bluedroid/api/include/esp_sdp_api.h @@ -1,9 +1,9 @@ -#ifndef __BT_SDP_API_H__ -#define __BT_SDP_API_H__ +#ifndef __ESP_SDP_API_H__ +#define __ESP_SDP_API_H__ #include #include "esp_err.h" -#include "bt_api_common.h" +#include "esp_bt_common.h" #include "bta_sdp_api.h" #include "bt_sdp.h" @@ -113,6 +113,5 @@ bool esp_bt_sdp_add_service_class_id_list(uint32_t handle, uint16_t *p_service_uuids); bool esp_bt_sdp_delete_attribute(uint32_t handle, uint16_t attr_id); -/**********************************************************************************************/ -/**********************************************************************************************/ -#endif /* __BT_SDP_API_H__ */ + +#endif /* __ESP_SDP_API_H__ */ diff --git a/components/bt/bluedroid/stack_api/include/bt_app_sec.h b/components/bt/bluedroid/api/include/esp_sec_api.h similarity index 65% rename from components/bt/bluedroid/stack_api/include/bt_app_sec.h rename to components/bt/bluedroid/api/include/esp_sec_api.h index 6b7310fd91..e078d73ff5 100644 --- a/components/bt/bluedroid/stack_api/include/bt_app_sec.h +++ b/components/bt/bluedroid/api/include/esp_sec_api.h @@ -1,16 +1,5 @@ -// 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" @@ -76,3 +65,4 @@ void app_ble_sec_gen_ltk(UINT8 key_size); void app_ble_security_start(void); +#endif /* __ESP_SEC_API_H__ */ diff --git a/components/bt/bluedroid/profiles/esp/blufi/include/blufi_adv.h b/components/bt/bluedroid/profiles/esp/blufi/include/blufi_adv.h index 1b1185ee4e..a01b288c49 100644 --- a/components/bt/bluedroid/profiles/esp/blufi/include/blufi_adv.h +++ b/components/bt/bluedroid/profiles/esp/blufi/include/blufi_adv.h @@ -3,7 +3,7 @@ #include "bta_api.h" #include "btm_ble_api.h" -#include "bt_app_defs.h" +#include "esp_bt_defs.h" typedef struct { diff --git a/components/bt/bluedroid/profiles/esp/include/button_pro.h b/components/bt/bluedroid/profiles/esp/include/button_pro.h index 67d4de4e45..f6397f2535 100644 --- a/components/bt/bluedroid/profiles/esp/include/button_pro.h +++ b/components/bt/bluedroid/profiles/esp/include/button_pro.h @@ -18,7 +18,7 @@ #include "bt_target.h" #include "gatt_api.h" #include "gattdefs.h" -#include "bt_app_api.h" +#include "esp_gatt_api.h" #define KEY_SUCCESS GATT_SUCCESS #define KEY_ILLEGAL_PARAM GATT_ILLEGAL_PARAMETER @@ -123,4 +123,4 @@ void button_msg_notify(uint16_t len, uint8_t *button_msg); extern button_env_cb_t button_cb_env; -#endif ///BUT_PROFILE_CFG \ No newline at end of file +#endif ///BUT_PROFILE_CFG diff --git a/components/bt/bluedroid/profiles/std/include/dis_api.h b/components/bt/bluedroid/profiles/std/include/dis_api.h index f84a7e62fc..95bf24ac59 100644 --- a/components/bt/bluedroid/profiles/std/include/dis_api.h +++ b/components/bt/bluedroid/profiles/std/include/dis_api.h @@ -28,7 +28,7 @@ #include "bt_target.h" #include "gatt_api.h" #include "gattdefs.h" -#include "bt_app_api.h" +#include "esp_gatt_api.h" #define DIS_SUCCESS GATT_SUCCESS #define DIS_ILLEGAL_PARAM GATT_ILLEGAL_PARAMETER diff --git a/components/bt/bluedroid/profiles/std/include/prf_defs.h b/components/bt/bluedroid/profiles/std/include/prf_defs.h index 8b9ed62ef2..242bb27fa4 100644 --- a/components/bt/bluedroid/profiles/std/include/prf_defs.h +++ b/components/bt/bluedroid/profiles/std/include/prf_defs.h @@ -20,7 +20,7 @@ #include "bta_gatts_int.h" #include "bta_gatt_api.h" #include "bt_types.h" -#include "bt_app_defs.h" +#include "esp_bt_defs.h" #define ATT_HANDLE_LEN 0x0002 diff --git a/components/bt/component.mk b/components/bt/component.mk index 5bb01a8138..9ba0d16641 100644 --- a/components/bt/component.mk +++ b/components/bt/component.mk @@ -27,7 +27,7 @@ COMPONENT_ADD_INCLUDEDIRS := bluedroid/bta/include \ bluedroid/stack/sdp/include \ bluedroid/stack/smp/include \ bluedroid/stack/include \ - bluedroid/stack_api/include \ + bluedroid/api/include \ bluedroid/include \ include @@ -77,7 +77,7 @@ COMPONENT_SRCDIRS := bluedroid/bta/dm \ bluedroid/stack/sdp \ bluedroid/stack/smp \ bluedroid/stack \ - bluedroid/stack_api \ + bluedroid/api \ bluedroid \ . diff --git a/examples/06_bluedroid_demos/components/bluedroid_demos/app_client_profiles/battery_c/battery_c.c b/examples/06_bluedroid_demos/components/bluedroid_demos/app_client_profiles/battery_c/battery_c.c index f5cd9964b3..9500f77090 100644 --- a/examples/06_bluedroid_demos/components/bluedroid_demos/app_client_profiles/battery_c/battery_c.c +++ b/examples/06_bluedroid_demos/components/bluedroid_demos/app_client_profiles/battery_c/battery_c.c @@ -31,7 +31,7 @@ #include "btm_api.h" #include "bt_types.h" #include "gattc_profile.h" -#include "bt_app_api.h" +#include "esp_gatt_api.h" #define BT_BD_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x" #define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] diff --git a/examples/06_bluedroid_demos/components/bluedroid_demos/app_core/bt_app.c b/examples/06_bluedroid_demos/components/bluedroid_demos/app_core/bt_app.c index 7507aa8445..1f699201fc 100644 --- a/examples/06_bluedroid_demos/components/bluedroid_demos/app_core/bt_app.c +++ b/examples/06_bluedroid_demos/components/bluedroid_demos/app_core/bt_app.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bt_app_defs.h" +#include "esp_bt_defs.h" /******************************************************************************* diff --git a/examples/06_bluedroid_demos/components/bluedroid_demos/app_project/SampleServerProject.c b/examples/06_bluedroid_demos/components/bluedroid_demos/app_project/SampleServerProject.c index c631cac1e3..e87f337837 100644 --- a/examples/06_bluedroid_demos/components/bluedroid_demos/app_project/SampleServerProject.c +++ b/examples/06_bluedroid_demos/components/bluedroid_demos/app_project/SampleServerProject.c @@ -47,12 +47,12 @@ #include "app_button.h" #include "hid_le_prf.h" -#include "bt_app_api.h" +#include "esp_gatt_api.h" // #include "hcimsgs.h" -#include "bt_app_defs.h" +#include "esp_bt_defs.h" #define BT_BD_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x" diff --git a/components/bt/bluedroid/stack_api/include/bt_app_common.h b/examples/06_bluedroid_demos/components/bluedroid_demos/include/bt_app_common.h similarity index 100% rename from components/bt/bluedroid/stack_api/include/bt_app_common.h rename to examples/06_bluedroid_demos/components/bluedroid_demos/include/bt_app_common.h