mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
feat(ieee802154): separated the 802.15.4 HAL codes from the HAL component
This commit is contained in:
@@ -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})
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/ieee802154_periph.h"
|
||||
#include "hal/ieee802154_periph.h"
|
||||
|
||||
const ieee802154_conn_t ieee802154_periph = {
|
||||
.module = PERIPH_IEEE802154_MODULE,
|
||||
+1
-2
@@ -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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "hal/ieee802154_common_ll.h"
|
||||
|
||||
#define IEEE802154_TXPOWER_VALUE_MAX 20
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/ieee802154_periph.h"
|
||||
#include "hal/ieee802154_periph.h"
|
||||
|
||||
const ieee802154_conn_t ieee802154_periph = {
|
||||
.module = PERIPH_IEEE802154_MODULE,
|
||||
+1
-2
@@ -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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "hal/ieee802154_common_ll.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -37,5 +37,5 @@ idf_component_register(
|
||||
PRIV_INCLUDE_DIRS "${private_include}"
|
||||
LDFRAGMENTS linker.lf
|
||||
REQUIRES esp_coex
|
||||
PRIV_REQUIRES esp_phy driver esp_timer soc hal
|
||||
PRIV_REQUIRES esp_phy esp_timer soc hal esp_pm esp_hal_ieee802154
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "freertos/portmacro.h"
|
||||
#include "soc/periph_defs.h"
|
||||
#include "soc/soc.h"
|
||||
#include "soc/ieee802154_periph.h"
|
||||
#include "hal/ieee802154_periph.h"
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
#include "esp_check.h"
|
||||
#include "esp_coex_i154.h"
|
||||
|
||||
@@ -99,12 +99,6 @@ if(CONFIG_SOC_TWAI_SUPPORTED)
|
||||
list(APPEND srcs "${target}/twai_periph.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_IEEE802154_SUPPORTED)
|
||||
if(NOT target STREQUAL "esp32h4")
|
||||
list(APPEND srcs "${target}/ieee802154_periph.c")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_USB_OTG_SUPPORTED)
|
||||
list(APPEND srcs "${target}/usb_periph.c"
|
||||
"${target}/usb_dwc_periph.c")
|
||||
|
||||
Reference in New Issue
Block a user