فهرست منبع

soc: add ieee8020154_only cap for esp32hx

wuzhenghui 3 سال پیش
والد
کامیت
3b43b63d47

+ 3 - 1
components/esp_hw_support/periph_ctrl.c

@@ -46,7 +46,7 @@ void periph_module_reset(periph_module_t periph)
     portEXIT_CRITICAL_SAFE(&periph_spinlock);
 }
 
-#if CONFIG_ESP32_WIFI_ENABLED
+#if !SOC_IEEE802154_BLE_ONLY
 IRAM_ATTR void wifi_bt_common_module_enable(void)
 {
 #if SOC_MODEM_CLOCK_IS_INDEPENDENT
@@ -74,7 +74,9 @@ IRAM_ATTR void wifi_bt_common_module_disable(void)
     portEXIT_CRITICAL_SAFE(&periph_spinlock);
 #endif
 }
+#endif
 
+#if CONFIG_ESP32_WIFI_ENABLED
 void wifi_module_enable(void)
 {
 #if SOC_MODEM_CLOCK_IS_INDEPENDENT

+ 1 - 1
components/esp_phy/CMakeLists.txt

@@ -15,7 +15,7 @@ else()
     set(ldfragments "linker.lf")
 endif()
 
-if(IDF_TARGET STREQUAL "esp32h4")
+if(CONFIG_SOC_IEEE802154_BLE_ONLY)
     list(APPEND srcs "src/phy_init_esp32hxx.c")
 else()
     list(APPEND srcs "src/phy_init.c")

+ 4 - 0
components/soc/esp32h2/include/soc/Kconfig.soc_caps.in

@@ -7,6 +7,10 @@ config SOC_IEEE802154_SUPPORTED
     bool
     default y
 
+config SOC_IEEE802154_BLE_ONLY
+    bool
+    default y
+
 config SOC_EFUSE_KEY_PURPOSE_FIELD
     bool
     default y

+ 1 - 0
components/soc/esp32h2/include/soc/soc_caps.h

@@ -33,6 +33,7 @@
 // #define SOC_TWAI_SUPPORTED              1 // TODO: IDF-6217
 // #define SOC_BT_SUPPORTED                1 // TODO: IDF-6416
 #define SOC_IEEE802154_SUPPORTED           1
+#define SOC_IEEE802154_BLE_ONLY            1
 // #define SOC_ASYNC_MEMCPY_SUPPORTED      1 // TODO: IDF-6238
 // #define SOC_USB_SERIAL_JTAG_SUPPORTED   1 // TODO: IDF-6239
 // #define SOC_TEMP_SENSOR_SUPPORTED       1 // TODO: IDF-6229

+ 4 - 0
components/soc/esp32h4/include/soc/Kconfig.soc_caps.in

@@ -27,6 +27,10 @@ config SOC_IEEE802154_SUPPORTED
     bool
     default y
 
+config SOC_IEEE802154_BLE_ONLY
+    bool
+    default y
+
 config SOC_ASYNC_MEMCPY_SUPPORTED
     bool
     default y

+ 1 - 0
components/soc/esp32h4/include/soc/soc_caps.h

@@ -39,6 +39,7 @@
 #define SOC_TWAI_SUPPORTED              1
 #define SOC_BT_SUPPORTED                1
 #define SOC_IEEE802154_SUPPORTED        1
+#define SOC_IEEE802154_BLE_ONLY         1
 #define SOC_ASYNC_MEMCPY_SUPPORTED      1
 #define SOC_USB_SERIAL_JTAG_SUPPORTED   1
 #define SOC_SUPPORTS_SECURE_DL_MODE     1