Skip to content

Commit

Permalink
ieee802154: add IEEE 802.15.4 component
Browse files Browse the repository at this point in the history
  • Loading branch information
chshu committed Jul 14, 2021
1 parent 5270d82 commit bdaeeb3
Show file tree
Hide file tree
Showing 8 changed files with 488 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitlab/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
/components/hal/ @esp-idf-codeowners/peripherals
/components/heap/ @esp-idf-codeowners/system
/components/idf_test/ @esp-idf-codeowners/ci
/components/ieee802154/ @esp-idf-codeowners/ieee802154
/components/jsmn/ @esp-idf-codeowners/app-utilities
/components/json/ @esp-idf-codeowners/app-utilities
/components/libsodium/ @esp-idf-codeowners/security
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,7 @@
[submodule "components/openthread/lib"]
path = components/openthread/lib
url = ../../espressif/esp-thread-lib.git

[submodule "components/ieee802154/lib"]
path = components/ieee802154/lib
url = ../../espressif/esp-ieee802154-lib.git
18 changes: 18 additions & 0 deletions components/ieee802154/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
idf_component_register(
INCLUDE_DIRS include
)

if(CONFIG_IEEE802154_ENABLED)
if(CONFIG_IEEE802154_LIB_FROM_INTERNAL_SRC)
idf_component_get_property(ieee802154_lib ieee802154_driver COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${ieee802154_lib}>)
else()
add_prebuilt_library(ieee802154_lib "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/lib802154.a")
target_link_libraries(${COMPONENT_LIB} INTERFACE ieee802154_lib)
endif()

# force the phy libraries to be linked behind ieee802154
idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> libphy.a libbtbb.a
$<TARGET_FILE:${esp_phy_lib}>)
endif()
15 changes: 15 additions & 0 deletions components/ieee802154/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
menu "IEEE 802.15.4"
visible if IDF_TARGET_ESP32H2

config IEEE802154_ENABLED
bool
default "y" if IDF_TARGET_ESP32H2

config IEEE802154_LIB_FROM_INTERNAL_SRC
bool "Build IEEE 802.15.4 libraries from source"
depends on IEEE802154_ENABLED
default n
help
Override the shipped lib802154.a for internal builds.

endmenu # IEEE 802.15.4
Loading

0 comments on commit bdaeeb3

Please sign in to comment.