drivers: use new IEEE 802.15.4 subsystem integration scheme

This commit introduces new scheme for integrating nRF IEEE 802.15.4
radio driver with Zephyr project.

nrf_802154 commit: c89637d597d81ae2b2a5b5bf18f0ba9c51912380

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
This commit is contained in:
Rafał Kuźnia 2021-03-16 04:03:48 +01:00 committed by Carles Cufí
parent 6667950c23
commit fc301b9758
165 changed files with 1901 additions and 3656 deletions

View File

@ -0,0 +1,13 @@
#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: BSD-3-Clause
#
add_library(nrf-802154-driver-interface INTERFACE)
add_library(nrf-802154-serialization-interface INTERFACE)
add_subdirectory(driver)
add_subdirectory(sl)
add_subdirectory(serialization)

View File

@ -0,0 +1,93 @@
#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: BSD-3-Clause
#
target_include_directories(nrf-802154-driver-interface INTERFACE include)
add_library(nrf-802154-driver STATIC EXCLUDE_FROM_ALL)
target_include_directories(nrf-802154-driver
PRIVATE
src
)
target_sources(nrf-802154-driver
PRIVATE
src/nrf_802154.c
src/nrf_802154_core.c
src/nrf_802154_core_hooks.c
src/nrf_802154_critical_section.c
src/nrf_802154_debug.c
src/nrf_802154_debug_assert.c
src/nrf_802154_pib.c
src/nrf_802154_peripherals_alloc.c
src/nrf_802154_queue.c
src/nrf_802154_rssi.c
src/nrf_802154_rx_buffer.c
src/nrf_802154_stats.c
src/nrf_802154_swi.c
src/nrf_802154_trx.c
src/mac_features/nrf_802154_csma_ca.c
src/mac_features/nrf_802154_delayed_trx.c
src/mac_features/nrf_802154_filter.c
src/mac_features/nrf_802154_frame_parser.c
src/mac_features/nrf_802154_ifs.c
src/mac_features/nrf_802154_precise_ack_timeout.c
src/mac_features/ack_generator/nrf_802154_ack_data.c
src/mac_features/ack_generator/nrf_802154_ack_generator.c
src/mac_features/ack_generator/nrf_802154_enh_ack_generator.c
src/mac_features/ack_generator/nrf_802154_imm_ack_generator.c
src/platform/temperature/nrf_802154_temperature_none.c
)
if (NRF52_SERIES)
target_sources(nrf-802154-driver PRIVATE src/nrf_802154_trx_ppi.c)
elseif (NRF53_SERIES)
target_sources(nrf-802154-driver PRIVATE src/nrf_802154_trx_dppi.c)
endif()
if (SL_OPENSOURCE)
target_sources(nrf-802154-driver
PRIVATE
src/nrf_802154_notification_direct.c
src/nrf_802154_request_direct.c
)
else ()
target_sources(nrf-802154-driver
PRIVATE
src/nrf_802154_notification_swi.c
src/nrf_802154_priority_drop_swi.c
src/nrf_802154_request_swi.c
)
endif ()
if (SL_OPENSOURCE OR NRF53_SERIES)
target_compile_definitions(nrf-802154-driver
PUBLIC
# Disable Frame Timestamps
NRF_802154_FRAME_TIMESTAMP_ENABLED=0
# Disable DTRX
NRF_802154_DELAYED_TRX_ENABLED=0
# Disable IFS
NRF_802154_IFS_ENABLED=0
)
else()
target_compile_definitions(nrf-802154-driver
PUBLIC
# Enable Frame Timestamps
NRF_802154_FRAME_TIMESTAMP_ENABLED=1
# Enable DTRX
NRF_802154_DELAYED_TRX_ENABLED=1
# Enable IFS
NRF_802154_IFS_ENABLED=1
)
endif()
target_link_libraries(nrf-802154-driver
PUBLIC
nrf-802154-driver-interface
nrf-802154-platform
nrf-802154-sl
)

View File

@ -56,7 +56,7 @@
#include "nrf_802154_request.h"
#include "nrf_802154_stats.h"
#include "mac_features/nrf_802154_frame_parser.h"
#include "platform/random/nrf_802154_random.h"
#include "platform/nrf_802154_random.h"
#include "rsch/nrf_802154_rsch.h"
#include "timer/nrf_802154_timer_sched.h"

View File

@ -61,10 +61,10 @@
#include "nrf_802154_rx_buffer.h"
#include "nrf_802154_stats.h"
#include "hal/nrf_radio.h"
#include "platform/clock/nrf_802154_clock.h"
#include "platform/lp_timer/nrf_802154_lp_timer.h"
#include "platform/random/nrf_802154_random.h"
#include "platform/temperature/nrf_802154_temperature.h"
#include "platform/nrf_802154_clock.h"
#include "platform/nrf_802154_lp_timer.h"
#include "platform/nrf_802154_random.h"
#include "platform/nrf_802154_temperature.h"
#include "rsch/nrf_802154_rsch.h"
#include "rsch/nrf_802154_rsch_crit_sect.h"
#include "rsch/nrf_802154_rsch_prio_drop.h"

View File

@ -76,8 +76,8 @@
#include "rsch/nrf_802154_rsch_crit_sect.h"
#include "timer/nrf_802154_timer_coord.h"
#include "timer/nrf_802154_timer_sched.h"
#include "platform/hp_timer/nrf_802154_hp_timer.h"
#include "platform/irq/nrf_802154_irq.h"
#include "platform/nrf_802154_hp_timer.h"
#include "platform/nrf_802154_irq.h"
#include "nrf_802154_core_hooks.h"
#include "nrf_802154_sl_ant_div.h"

View File

@ -50,8 +50,8 @@
#include "nrf_802154_utils.h"
#include "hal/nrf_radio.h"
#include "rsch/nrf_802154_rsch.h"
#include "platform/lp_timer/nrf_802154_lp_timer.h"
#include "platform/irq/nrf_802154_irq.h"
#include "platform/nrf_802154_lp_timer.h"
#include "platform/nrf_802154_irq.h"
#include <nrf.h>

View File

@ -47,7 +47,7 @@
#include "nrf_802154_swi.h"
#include "hal/nrf_egu.h"
#include "platform/clock/nrf_802154_clock.h"
#include "platform/nrf_802154_clock.h"
#define HFCLK_STOP_INT NRF_EGU_INT_TRIGGERED1 ///< Label of HFClk stop interrupt.
#define HFCLK_STOP_TASK NRF_EGU_TASK_TRIGGER1 ///< Label of HFClk stop task.

View File

@ -55,7 +55,7 @@
#include "nrf_802154_utils.h"
#include "hal/nrf_radio.h"
#include "hal/nrf_egu.h"
#include "platform/irq/nrf_802154_irq.h"
#include "platform/nrf_802154_irq.h"
#include <nrf.h>

View File

@ -42,7 +42,7 @@
#include "nrf.h"
#include <stdint.h>
#include "platform/temperature/nrf_802154_temperature.h"
#include "platform/nrf_802154_temperature.h"
#if defined(NRF52_SERIES)

View File

@ -49,7 +49,7 @@
#include "nrf_802154_config.h"
#include "nrf_802154_peripherals.h"
#include "nrf_802154_utils.h"
#include "platform/irq/nrf_802154_irq.h"
#include "platform/nrf_802154_irq.h"
#if NRF_802154_INTERNAL_SWI_IRQ_HANDLING
/* SWI interrupt handling functionality is implemented directly by the chosen EGU IRQ handler. */

View File

@ -57,7 +57,7 @@
#include "nrf_802154_procedures_duration.h"
#include "nrf_802154_critical_section.h"
#include "mpsl_fem_protocol_api.h"
#include "platform/irq/nrf_802154_irq.h"
#include "platform/nrf_802154_irq.h"
#include "nrf_802154_sl_ant_div.h"

View File

@ -41,7 +41,7 @@
*
*/
#include "nrf_802154_temperature.h"
#include "platform/nrf_802154_temperature.h"
#include <stdint.h>

View File

@ -0,0 +1,54 @@
#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: BSD-3-Clause
#
target_include_directories(nrf-802154-serialization-interface
INTERFACE
include
include/platform
include/serialization
)
add_library(nrf-802154-serialization STATIC EXCLUDE_FROM_ALL)
target_include_directories(nrf-802154-serialization
PRIVATE
src/include
)
target_sources(nrf-802154-serialization
PRIVATE
spinel_base/spinel.c
src/nrf_802154_buffer_allocator.c
src/nrf_802154_buffer_mgr_dst.c
src/nrf_802154_buffer_mgr_src.c
src/nrf_802154_kvmap.c
src/nrf_802154_spinel.c
src/nrf_802154_spinel_dec.c
)
if (SER_HOST)
target_include_directories(nrf-802154-serialization-interface
INTERFACE
include/host
)
target_sources(nrf-802154-serialization
PRIVATE
src/nrf_802154_spinel_app.c
src/nrf_802154_spinel_dec_app.c
)
else ()
target_sources(nrf-802154-serialization
PRIVATE
src/nrf_802154_spinel_net.c
src/nrf_802154_spinel_dec_net.c
)
endif()
target_link_libraries(nrf-802154-serialization
PRIVATE
nrf-802154-serialization-interface
nrf-802154-platform
)

Some files were not shown because too many files have changed in this diff Show More