From 58ff27cc03b082434ce35744a70d459017f88c8e Mon Sep 17 00:00:00 2001 From: weitianhua Date: Mon, 25 Oct 2021 20:15:13 +0800 Subject: [PATCH 1/3] Make Classic BT related document links only visible for ESP32 --- components/soc/esp32/include/soc/soc_caps.h | 3 +++ components/soc/esp32c3/include/soc/soc_caps.h | 3 +++ components/soc/esp32s3/include/soc/soc_caps.h | 18 +++++++++++++ docs/conf_common.py | 25 ++++++++++++++++++- docs/en/api-reference/bluetooth/index.rst | 2 +- docs/zh_CN/api-reference/bluetooth/index.rst | 2 +- 6 files changed, 50 insertions(+), 3 deletions(-) diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index ff75aa135e..f315c7b71c 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -278,3 +278,6 @@ /*------------------------------ BLE --------------------------------------------*/ #define SOC_BLE_DONT_UPDATE_OWN_RPA (1) + +/*------------------------------ Classic BT --------------------------------------------*/ +#define SOC_CLASSIC_BT_SUPPORTED (1) /* ESP32 Support Classic BT */ diff --git a/components/soc/esp32c3/include/soc/soc_caps.h b/components/soc/esp32c3/include/soc/soc_caps.h index e61cf8493d..745eeef70f 100644 --- a/components/soc/esp32c3/include/soc/soc_caps.h +++ b/components/soc/esp32c3/include/soc/soc_caps.h @@ -268,3 +268,6 @@ #define SOC_PM_SUPPORT_WIFI_PD (1) #define SOC_PM_SUPPORT_BT_PD (1) + +/*------------------------------ Classic BT --------------------------------------------*/ +#define SOC_CLASSIC_BT_SUPPORTED (0) /* ESP32-C3 doesn't support Classic BT */ diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index 05ccb0a54e..40923fa459 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -13,13 +13,31 @@ #define SOC_CPU_CORES_NUM 2 #define SOC_CACHE_SUPPORT_WRAP 1 #define SOC_ULP_SUPPORTED 1 +<<<<<<< HEAD +======= +#define SOC_BT_SUPPORTED 1 +#define SOC_USB_OTG_SUPPORTED 1 +#define SOC_USB_SERIAL_JTAG_SUPPORTED 1 +>>>>>>> f4aad85f8b... Make Classic BT related document links only visible for ESP32 #define SOC_RTC_SLOW_MEM_SUPPORTED 1 #define SOC_CCOMP_TIMER_SUPPORTED 1 #define SOC_DIG_SIGN_SUPPORTED 1 #define SOC_HMAC_SUPPORTED 1 #define SOC_ASYNC_MEMCPY_SUPPORTED 1 #define SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS 3 +<<<<<<< HEAD +======= +#define SOC_EFUSE_REVOKE_BOOT_KEY_DIGESTS 1 +#define SOC_SDMMC_HOST_SUPPORTED 1 +#define SOC_FLASH_ENCRYPTION_XTS_AES 1 +#define SOC_FLASH_ENCRYPTION_XTS_AES_256 1 +#define SOC_PSRAM_DMA_CAPABLE 1 +#define SOC_XT_WDT_SUPPORTED 1 + +/*-------------------------- SOC CAPS ----------------------------------------*/ +#define SOC_APPCPU_HAS_CLOCK_GATING_BUG (1) +>>>>>>> f4aad85f8b... Make Classic BT related document links only visible for ESP32 /*-------------------------- ADC CAPS ----------------------------------------*/ #include "adc_caps.h" diff --git a/docs/conf_common.py b/docs/conf_common.py index 3db4d9620b..a0af5226ba 100644 --- a/docs/conf_common.py +++ b/docs/conf_common.py @@ -136,7 +136,29 @@ exclude_patterns = ['**/inc/**', '_static/', '_build/**'] BT_DOCS = ['api-guides/blufi.rst', 'api-guides/esp-ble-mesh/**', - 'api-reference/bluetooth/**'] + 'api-reference/bluetooth/bt_le.rst', + 'api-reference/bluetooth/esp_bt_defs.rst', + 'api-reference/bluetooth/esp_bt_device.rst', + 'api-reference/bluetooth/esp_bt_main.rst', + 'api-reference/bluetooth/bt_common.rst', + 'api-reference/bluetooth/controller_vhci.rst', + 'api-reference/bluetooth/esp_gap_ble.rst', + 'api-reference/bluetooth/esp_gatt_defs.rst', + 'api-reference/bluetooth/esp_gatts.rst', + 'api-reference/bluetooth/esp_gattc.rst', + 'api-reference/bluetooth/esp_blufi.rst', + 'api-reference/bluetooth/esp-ble-mesh.rst', + 'api-reference/bluetooth/index.rst', + 'api-reference/bluetooth/nimble/index.rst'] + +CLASSIC_BT_DOCS = ['api-reference/bluetooth/classic_bt.rst', + 'api-reference/bluetooth/esp_a2dp.rst', + 'api-reference/bluetooth/esp_avrc.rst', + 'api-reference/bluetooth/esp_hf_defs.rst', + 'api-reference/bluetooth/esp_hf_client.rst', + 'api-reference/bluetooth/esp_hf_ag.rst', + 'api-reference/bluetooth/esp_spp.rst', + 'api-reference/bluetooth/esp_gap_bt.rst'] SDMMC_DOCS = ['api-reference/peripherals/sdmmc_host.rst', 'api-reference/peripherals/sd_pullup_requirements.rst'] @@ -205,6 +227,7 @@ ESP32C3_DOCS = ['hw-reference/esp32c3/**'] # format: {tag needed to include: documents to included}, tags are parsed from sdkconfig and peripheral_caps.h headers conditional_include_dict = {'SOC_BT_SUPPORTED':BT_DOCS, + 'SOC_CLASSIC_BT_SUPPORTED':CLASSIC_BT_DOCS, 'SOC_SDMMC_HOST_SUPPORTED':SDMMC_DOCS, 'SOC_SDIO_SLAVE_SUPPORTED':SDIO_SLAVE_DOCS, 'SOC_MCPWM_SUPPORTED':MCPWM_DOCS, diff --git a/docs/en/api-reference/bluetooth/index.rst b/docs/en/api-reference/bluetooth/index.rst index 719373dbc7..7916e0a0c4 100644 --- a/docs/en/api-reference/bluetooth/index.rst +++ b/docs/en/api-reference/bluetooth/index.rst @@ -9,7 +9,7 @@ Bluetooth API Bluetooth Controller && VHCI Bluetooth Common Bluetooth LE - Bluetooth Classic + :SOC_CLASSIC_BT_SUPPORTED: Bluetooth Classic NimBLE ESP-BLE-MESH diff --git a/docs/zh_CN/api-reference/bluetooth/index.rst b/docs/zh_CN/api-reference/bluetooth/index.rst index d9ccbbf9b6..f2b24f207d 100644 --- a/docs/zh_CN/api-reference/bluetooth/index.rst +++ b/docs/zh_CN/api-reference/bluetooth/index.rst @@ -9,7 +9,7 @@ Bluetooth Controller && VHCI Bluetooth Common Bluetooth LE - Bluetooth Classic + :SOC_CLASSIC_BT_SUPPORTED: Bluetooth Classic NimBLE ESP-BLE-MESH From f765b7acb604e92baeda00c8938c92760069ed61 Mon Sep 17 00:00:00 2001 From: weitianhua Date: Wed, 27 Oct 2021 15:27:27 +0800 Subject: [PATCH 2/3] Make ESP32 Bluetooth stack architecture Doc only visible for ESP32 --- docs/en/api-reference/bluetooth/index.rst | 7 ++++--- docs/zh_CN/api-reference/bluetooth/index.rst | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/en/api-reference/bluetooth/index.rst b/docs/en/api-reference/bluetooth/index.rst index 7916e0a0c4..d9421458c0 100644 --- a/docs/en/api-reference/bluetooth/index.rst +++ b/docs/en/api-reference/bluetooth/index.rst @@ -18,11 +18,12 @@ ESP-IDF currently supports two host stacks. The Bluedroid based stack (default) * For usecases involving classic Bluetooth as well as BLE, Bluedroid should be used. * For BLE-only usecases, using NimBLE is recommended. It is less demanding in terms of code footprint and runtime memory, making it suitable for such scenarios. +.. only:: esp32 -For the overview of the ESP32 Bluetooth stack architecture, follow the links below: + For the overview of the ESP32 Bluetooth stack architecture, follow the links below: -* `ESP32 Bluetooth Architecture (PDF) [English] `_ -* `ESP32 Bluetooth Architecture (PDF) [中文] `_ + * `ESP32 Bluetooth Architecture (PDF) [English] `_ + * `ESP32 Bluetooth Architecture (PDF) [中文] `_ Code examples for this API section are provided in the :example:`bluetooth/bluedroid` directory of ESP-IDF examples. diff --git a/docs/zh_CN/api-reference/bluetooth/index.rst b/docs/zh_CN/api-reference/bluetooth/index.rst index f2b24f207d..53ba70bc49 100644 --- a/docs/zh_CN/api-reference/bluetooth/index.rst +++ b/docs/zh_CN/api-reference/bluetooth/index.rst @@ -13,9 +13,11 @@ NimBLE ESP-BLE-MESH -请点击下方链接,查看 ESP32 蓝牙架构: +.. only:: esp32 -`ESP32 蓝牙架构 (PDF) `_ + 请点击下方链接,查看 ESP32 蓝牙架构: + + `ESP32 蓝牙架构 (PDF) `_ 蓝牙 API 的示例代码存放于 ESP-IDF :example:`bluetooth/bluedroid` 示例目录下,请查看。 From b2fba50e784291448428f55f42589ef528c07c7b Mon Sep 17 00:00:00 2001 From: weitianhua Date: Thu, 28 Oct 2021 19:25:44 +0800 Subject: [PATCH 3/3] Remove dummy defines of Classic BT --- components/soc/esp32/include/soc/soc_caps.h | 4 +--- components/soc/esp32c3/include/soc/soc_caps.h | 3 --- components/soc/esp32s3/include/soc/soc_caps.h | 18 ------------------ 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index f315c7b71c..59d06ed2dd 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -63,6 +63,7 @@ #define SOC_MCPWM_SUPPORTED 1 #define SOC_SDMMC_HOST_SUPPORTED 1 #define SOC_BT_SUPPORTED 1 +#define SOC_CLASSIC_BT_SUPPORTED 1 #define SOC_PCNT_SUPPORTED 1 #define SOC_SDIO_SLAVE_SUPPORTED 1 #define SOC_TWAI_SUPPORTED 1 @@ -278,6 +279,3 @@ /*------------------------------ BLE --------------------------------------------*/ #define SOC_BLE_DONT_UPDATE_OWN_RPA (1) - -/*------------------------------ Classic BT --------------------------------------------*/ -#define SOC_CLASSIC_BT_SUPPORTED (1) /* ESP32 Support Classic BT */ diff --git a/components/soc/esp32c3/include/soc/soc_caps.h b/components/soc/esp32c3/include/soc/soc_caps.h index 745eeef70f..e61cf8493d 100644 --- a/components/soc/esp32c3/include/soc/soc_caps.h +++ b/components/soc/esp32c3/include/soc/soc_caps.h @@ -268,6 +268,3 @@ #define SOC_PM_SUPPORT_WIFI_PD (1) #define SOC_PM_SUPPORT_BT_PD (1) - -/*------------------------------ Classic BT --------------------------------------------*/ -#define SOC_CLASSIC_BT_SUPPORTED (0) /* ESP32-C3 doesn't support Classic BT */ diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index 40923fa459..38c53510ee 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -13,31 +13,13 @@ #define SOC_CPU_CORES_NUM 2 #define SOC_CACHE_SUPPORT_WRAP 1 #define SOC_ULP_SUPPORTED 1 -<<<<<<< HEAD -======= #define SOC_BT_SUPPORTED 1 -#define SOC_USB_OTG_SUPPORTED 1 -#define SOC_USB_SERIAL_JTAG_SUPPORTED 1 ->>>>>>> f4aad85f8b... Make Classic BT related document links only visible for ESP32 #define SOC_RTC_SLOW_MEM_SUPPORTED 1 #define SOC_CCOMP_TIMER_SUPPORTED 1 #define SOC_DIG_SIGN_SUPPORTED 1 #define SOC_HMAC_SUPPORTED 1 #define SOC_ASYNC_MEMCPY_SUPPORTED 1 #define SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS 3 -<<<<<<< HEAD - -======= -#define SOC_EFUSE_REVOKE_BOOT_KEY_DIGESTS 1 -#define SOC_SDMMC_HOST_SUPPORTED 1 -#define SOC_FLASH_ENCRYPTION_XTS_AES 1 -#define SOC_FLASH_ENCRYPTION_XTS_AES_256 1 -#define SOC_PSRAM_DMA_CAPABLE 1 -#define SOC_XT_WDT_SUPPORTED 1 - -/*-------------------------- SOC CAPS ----------------------------------------*/ -#define SOC_APPCPU_HAS_CLOCK_GATING_BUG (1) ->>>>>>> f4aad85f8b... Make Classic BT related document links only visible for ESP32 /*-------------------------- ADC CAPS ----------------------------------------*/ #include "adc_caps.h"