feat(ieee802154): separated the 802.15.4 HAL codes from the HAL component

This commit is contained in:
zwx
2026-01-07 15:28:05 +08:00
parent 29b865dc07
commit 47af508b7a
19 changed files with 73 additions and 64 deletions
+1
View File
@@ -95,6 +95,7 @@
/components/esp_event/ @esp-idf-codeowners/system /components/esp_event/ @esp-idf-codeowners/system
/components/esp_gdbstub/ @esp-idf-codeowners/debugging /components/esp_gdbstub/ @esp-idf-codeowners/debugging
/components/esp_hal_*/ @esp-idf-codeowners/peripherals /components/esp_hal_*/ @esp-idf-codeowners/peripherals
/components/esp_hal_ieee802154/ @esp-idf-codeowners/ieee802154
/components/esp_hal_pmu/ @esp-idf-codeowners/power-management @esp-idf-codeowners/peripherals /components/esp_hal_pmu/ @esp-idf-codeowners/power-management @esp-idf-codeowners/peripherals
/components/esp_hal_rtc_timer/ @esp-idf-codeowners/power-management @esp-idf-codeowners/peripherals /components/esp_hal_rtc_timer/ @esp-idf-codeowners/power-management @esp-idf-codeowners/peripherals
/components/esp_hid/ @esp-idf-codeowners/bluetooth /components/esp_hid/ @esp-idf-codeowners/bluetooth
@@ -0,0 +1,15 @@
idf_build_get_property(target IDF_TARGET)
set(includes "include")
set(srcs "")
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
list(APPEND includes "${target}/include")
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/ieee802154_periph.c")
list(APPEND srcs "${target}/ieee802154_periph.c")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes})
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "hal/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_INTR_SOURCE,
};
@@ -1,12 +1,11 @@
/* /*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#include <stdbool.h>
#include "hal/ieee802154_common_ll.h" #include "hal/ieee802154_common_ll.h"
#define IEEE802154_TXPOWER_VALUE_MAX 20 #define IEEE802154_TXPOWER_VALUE_MAX 20
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "hal/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_SOURCE,
};
@@ -1,12 +1,11 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#include <stdbool.h>
#include "hal/ieee802154_common_ll.h" #include "hal/ieee802154_common_ll.h"
#define IEEE802154_TXPOWER_VALUE_MAX 20 #define IEEE802154_TXPOWER_VALUE_MAX 20
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "hal/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_INTR_SOURCE,
};
@@ -1,12 +1,11 @@
/* /*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#include <stdbool.h>
#include "hal/ieee802154_common_ll.h" #include "hal/ieee802154_common_ll.h"
#ifdef __cplusplus #ifdef __cplusplus
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "hal/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_INTR_SOURCE,
};
@@ -1,12 +1,11 @@
/* /*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#include <stdbool.h>
#include "hal/ieee802154_common_ll.h" #include "hal/ieee802154_common_ll.h"
#ifdef __cplusplus #ifdef __cplusplus
@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -1,7 +1,7 @@
/* /*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 OR MIT * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
+1 -1
View File
@@ -37,5 +37,5 @@ idf_component_register(
PRIV_INCLUDE_DIRS "${private_include}" PRIV_INCLUDE_DIRS "${private_include}"
LDFRAGMENTS linker.lf LDFRAGMENTS linker.lf
REQUIRES esp_coex REQUIRES esp_coex
PRIV_REQUIRES esp_phy esp_timer soc hal esp_pm PRIV_REQUIRES esp_phy esp_timer soc hal esp_pm esp_hal_ieee802154
) )
@@ -9,7 +9,7 @@
#include "freertos/portmacro.h" #include "freertos/portmacro.h"
#include "soc/periph_defs.h" #include "soc/periph_defs.h"
#include "soc/soc.h" #include "soc/soc.h"
#include "soc/ieee802154_periph.h" #include "hal/ieee802154_periph.h"
#include "esp_private/esp_modem_clock.h" #include "esp_private/esp_modem_clock.h"
#include "esp_check.h" #include "esp_check.h"
#include "esp_coex_i154.h" #include "esp_coex_i154.h"
-3
View File
@@ -78,9 +78,6 @@ if(CONFIG_SOC_SDMMC_HOST_SUPPORTED)
list(APPEND srcs "${target_folder}/sdmmc_periph.c") list(APPEND srcs "${target_folder}/sdmmc_periph.c")
endif() endif()
if(CONFIG_SOC_IEEE802154_SUPPORTED)
list(APPEND srcs "${target_folder}/ieee802154_periph.c")
endif()
if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED) if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED)
list(APPEND srcs "${target_folder}/sdio_slave_periph.c") list(APPEND srcs "${target_folder}/sdio_slave_periph.c")
@@ -1,12 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#include "soc/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_INTR_SOURCE,
};
@@ -1,12 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#include "soc/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_SOURCE,
};
@@ -1,12 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#include "soc/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_INTR_SOURCE,
};
@@ -1,12 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#include "soc/ieee802154_periph.h"
const ieee802154_conn_t ieee802154_periph = {
.module = PERIPH_IEEE802154_MODULE,
.irq_id = ETS_ZB_MAC_INTR_SOURCE,
};