Skip to content

Commit bdaeeb3

Browse files
committedJul 14, 2021
ieee802154: add IEEE 802.15.4 component
1 parent 5270d82 commit bdaeeb3

File tree

8 files changed

+488
-2
lines changed

8 files changed

+488
-2
lines changed
 

‎.gitlab/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
/components/hal/ @esp-idf-codeowners/peripherals
107107
/components/heap/ @esp-idf-codeowners/system
108108
/components/idf_test/ @esp-idf-codeowners/ci
109+
/components/ieee802154/ @esp-idf-codeowners/ieee802154
109110
/components/jsmn/ @esp-idf-codeowners/app-utilities
110111
/components/json/ @esp-idf-codeowners/app-utilities
111112
/components/libsodium/ @esp-idf-codeowners/security

‎.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,7 @@
106106
[submodule "components/openthread/lib"]
107107
path = components/openthread/lib
108108
url = ../../espressif/esp-thread-lib.git
109+
110+
[submodule "components/ieee802154/lib"]
111+
path = components/ieee802154/lib
112+
url = ../../espressif/esp-ieee802154-lib.git

‎components/ieee802154/CMakeLists.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
idf_component_register(
2+
INCLUDE_DIRS include
3+
)
4+
5+
if(CONFIG_IEEE802154_ENABLED)
6+
if(CONFIG_IEEE802154_LIB_FROM_INTERNAL_SRC)
7+
idf_component_get_property(ieee802154_lib ieee802154_driver COMPONENT_LIB)
8+
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${ieee802154_lib}>)
9+
else()
10+
add_prebuilt_library(ieee802154_lib "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/lib802154.a")
11+
target_link_libraries(${COMPONENT_LIB} INTERFACE ieee802154_lib)
12+
endif()
13+
14+
# force the phy libraries to be linked behind ieee802154
15+
idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB)
16+
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> libphy.a libbtbb.a
17+
$<TARGET_FILE:${esp_phy_lib}>)
18+
endif()

‎components/ieee802154/Kconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
menu "IEEE 802.15.4"
2+
visible if IDF_TARGET_ESP32H2
3+
4+
config IEEE802154_ENABLED
5+
bool
6+
default "y" if IDF_TARGET_ESP32H2
7+
8+
config IEEE802154_LIB_FROM_INTERNAL_SRC
9+
bool "Build IEEE 802.15.4 libraries from source"
10+
depends on IEEE802154_ENABLED
11+
default n
12+
help
13+
Override the shipped lib802154.a for internal builds.
14+
15+
endmenu # IEEE 802.15.4

0 commit comments

Comments
 (0)
Please sign in to comment.