Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <stdint.h>
#include <stddef.h>
#include "nrf.h"
#include "nrfx.h"

#if defined(NRF91_SERIES) || defined(NRF5340_XXAA_APPLICATION)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <stdint.h>
#include <stddef.h>
#include "nrf.h"
#include "nrfx.h"

#if defined(NRF91_SERIES) || defined(NRF5340_XXAA_APPLICATION)

Expand Down
3 changes: 1 addition & 2 deletions gzll/include/nrf_gzll.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#ifndef NRF_GZLL_H__
#define NRF_GZLL_H__

#include <stdbool.h>
#include "nrf.h"
#include "nrfx.h"
#include "nrf_gzll_constants.h"

#ifdef __cplusplus
Expand Down
3 changes: 1 addition & 2 deletions gzll/include/nrf_gzll_glue.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* File defines a set of functions and variables called by Gazell Link Layer.
*/

#include <nrf.h>
#include <nrf_peripherals.h>
#include <nrfx.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion mpsl/fem/include/mpsl_fem_config_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <stdint.h>
#include <stdbool.h>
#include <nrf.h>
#include <nrfx.h>

#ifdef __cplusplus
extern "C" {
Expand Down
3 changes: 1 addition & 2 deletions mpsl/fem/include/protocol/mpsl_fem_protocol_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
#include <stdint.h>
#include <stdbool.h>

#include <nrf.h>
#include <nrf_peripherals.h>
#include <nrfx.h>
#include "nrf_errno.h"
#include "mpsl_tx_power.h"
#include "mpsl_fem_types.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <stdbool.h>
#include "mpsl_fem_config_common.h"
#include "mpsl_fem_config_nrf21540_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <stdbool.h>
#include "mpsl_fem_config_common.h"
#include "mpsl_fem_config_nrf21540_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion mpsl/fem/nrf2220/include/mpsl_fem_config_nrf2220.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "mpsl_fem_config_common.h"
#include "mpsl_fem_nrf22xx_twi_config_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion mpsl/fem/nrf2240/include/mpsl_fem_config_nrf2240.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "mpsl_fem_config_common.h"
#include "mpsl_fem_nrf22xx_twi_config_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <stdint.h>
#include <stdbool.h>
#include <nrf.h>
#include <nrfx.h>
#include <nrf_errno.h>

#include <mpsl_fem_config_common.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "mpsl_fem_config_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions mpsl/include/mpsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ extern "C" {

#include <stdint.h>
#include <stdbool.h>
#include "nrf.h"
#include "nrf_peripherals.h"
#include "nrfx.h"
#include "nrf_errno.h"
#include "mpsl_clock.h"
#include "mpsl_hwres.h"
#include "mpsl_hwres_ppi.h"
#include "mpsl_dppi.h"

/** @brief High IRQ priority
*
Expand Down
3 changes: 1 addition & 2 deletions mpsl/include/mpsl_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ extern "C" {

#include <stdint.h>
#include <stdbool.h>
#include "nrf.h"
#include "nrf_errno.h"
#include "nrfx.h"
#if !defined (NRF54H_SERIES) && !defined (NRF92_SERIES)
#include "hal/nrf_clock.h"
#endif /* !NRF54H20_XXAA && !NRF92H20_XXAA */
Expand Down
68 changes: 68 additions & 0 deletions mpsl/include/mpsl_dppi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/**
* @file mpsl_dppi.h
*
* @defgroup mpsl_dppi MPSL DPPI API
* @ingroup mpsl
*
* This file defines an API to dynamically allocate some of hardware
* resources. The allocation functions are expected to be implemented
* outside of the MPSL.
* @{
*/

#ifndef MPSL_DPPI_H__
#define MPSL_DPPI_H__

#include <nrfx.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(DPPI_PRESENT) || defined(DOXYGEN)

/** @brief Allocate a DPPI channel of a DPPIC controller instance.
*
* @param[in] p_dppic Pointer to a DPPIC controller instance.
* @param[out] p_dppi_ch Allocated DPPI channel number on the given DPPIC instance.
* Value written at this pointer is valid only on successful
* allocation.
*
* @retval true Allocation successful.
* @retval false Allocation failed.
*/
bool mpsl_hwres_dppi_channel_alloc(NRF_DPPIC_Type * p_dppic, uint8_t * p_dppi_ch);

#endif /* DPPI_PRESENT */

#if defined(PPIB_PRESENT) || defined(DOXYGEN)

/** @brief Allocate a PPIB channel of a PPIB-to-PPIB interconnection.
*
* @param[in] p_ppib Pointer to a PPIB instance.
* @param[out] p_ppib_ch Allocated PPIB channel number the for PPIB-to-PPIB
* interconnection identified by the @p p_ppib being one
* of the sides of the interconnection.
* Value written at this pointer valid only on successful
* allocation.
*
* @retval true Allocation successful.
* @retval false Allocation failed.
*/
bool mpsl_hwres_ppib_channel_alloc(NRF_PPIB_Type * p_ppib, uint8_t * p_ppib_ch);

#endif /* PPIB_PRESENT */

#ifdef __cplusplus
}
#endif

#endif // MPSL_DPPI_H__

/**@} */
46 changes: 22 additions & 24 deletions mpsl/include/mpsl_hwres.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,44 @@

#include <stdbool.h>
#include <stdint.h>
#include "nrf.h"
#include "nrf_peripherals.h"
#include "mpsl_hwres_ppi.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Reserved (D)PPI, PPIB and IPCT resources for the supported platforms. */
#include "nrfx.h"
#include "mpsl_hwres_zephyr.h"

#if defined(NRF52_SERIES)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
/* This corresponds to the PPI channels 19, 30, and 31. */
#define MPSL_PPI_CHANNELS_USED_MASK (0xc0080000)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
#define MPSL_PPI_CHANNELS_USED_MASK MPSL_NRF52_PPI_CHANNELS_USED_MASK
#elif defined(NRF53_SERIES)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
/* This corresponds to the DPPI channels 0, 1, and 2. */
#define MPSL_DPPIC_CHANNELS_USED_MASK (0x00000007)
#elif defined(LUMOS_XXAA)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC10_CHANNELS_USED_MASK (0x00000001)
#define MPSL_DPPIC20_CHANNELS_USED_MASK (0x00000001)
#define MPSL_PPIB11_CHANNELS_USED_MASK (0x00000001)
#define MPSL_PPIB21_CHANNELS_USED_MASK (0x00000001)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
#define MPSL_DPPIC_CHANNELS_USED_MASK MPSL_NRF53_DPPIC_CHANNELS_USED_MASK
#elif defined(NRF54L_SERIES)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC10_CHANNELS_USED_MASK MPSL_NRF54L_DPPIC10_CHANNELS_USED_MASK
#define MPSL_DPPIC20_CHANNELS_USED_MASK MPSL_NRF54L_DPPIC20_CHANNELS_USED_MASK
#define MPSL_PPIB11_CHANNELS_USED_MASK MPSL_NRF54L_PPIB11_CHANNELS_USED_MASK
#define MPSL_PPIB21_CHANNELS_USED_MASK MPSL_NRF54L_PPIB21_CHANNELS_USED_MASK
#elif defined(NRF54H_SERIES) || defined(GRTC_PRESENT)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC020_CHANNELS_USED_MASK (0x00000001)
#define MPSL_IPCT130_CHANNELS_USED_MASK (0x00000001)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC020_CHANNELS_USED_MASK MPSL_NRF54H_DPPIC020_CHANNELS_USED_MASK
#define MPSL_IPCT130_CHANNELS_USED_MASK MPSL_NRF54H_IPCT130_CHANNELS_USED_MASK
#else
#error Unknown NRF series.
#error Unknown NRF series.
#endif

/* Defines which timer is being used by the MPSL implementation */
#if defined(NRF52_SERIES)
#define MPSL_TIMER0 NRF_TIMER0
#define MPSL_TIMER0 NRF_TIMER0
#elif defined(NRF53_SERIES)
#define MPSL_TIMER0 NRF_TIMER0_NS
#elif defined(LUMOS_XXAA)
#define MPSL_TIMER0 NRF_TIMER10
#define MPSL_TIMER0 NRF_TIMER0_NS
#elif defined(NRF54L_SERIES)
#define MPSL_TIMER0 NRF_TIMER10
#else
#define MPSL_TIMER0 NRF_TIMER020
#define MPSL_TIMER0 NRF_TIMER020
#endif

#ifdef __cplusplus
Expand Down
45 changes: 45 additions & 0 deletions mpsl/include/mpsl_hwres_zephyr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/**
* @file mpsl_hwres_zephyr.h
*
* @defgroup mpsl_hwres MPSL hardware resources API for Zephyr
* @ingroup mpsl
*
* This file defines fixed hardware resources used by the MPSL in Zephyr.
* @{
*/

#ifndef MPSL_HWRES_ZEPHYR_H__
#define MPSL_HWRES_ZEPHYR_H__

#include <stdbool.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/* Reserved (D)PPI, PPIB and IPCT resources for the supported platforms. */
/* This corresponds to the PPI channels 19, 30, and 31. */
#define MPSL_NRF52_PPI_CHANNELS_USED_MASK (0xc0080000)
/* This corresponds to the DPPI channels 0, 1, and 2. */
#define MPSL_NRF53_DPPIC_CHANNELS_USED_MASK (0x00000007)
#define MPSL_NRF54L_DPPIC10_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54L_DPPIC20_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54L_PPIB11_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54L_PPIB21_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54H_DPPIC020_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54H_IPCT130_CHANNELS_USED_MASK (0x00000001)

#ifdef __cplusplus
}
#endif

#endif // MPSL_HWRES_ZEPHYR_H__

/**@} */
3 changes: 1 addition & 2 deletions mpsl/include/mpsl_timeslot.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ extern "C" {
#endif

#include <stdint.h>
#include "nrf.h"
#include "nrf_peripherals.h"
#include "nrfx.h"
#include "nrf_errno.h"

/** @brief The shortest allowed timeslot event in microseconds. */
Expand Down
2 changes: 1 addition & 1 deletion mpsl/include/protocol/mpsl_dppi_protocol_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef MPSL_DPPI_PROTOCOL_API_H__
#define MPSL_DPPI_PROTOCOL_API_H__

#include "nrf_peripherals.h"
#include "nrfx.h"
#if (defined DPPIC_PRESENT || defined DOXYGEN)

/**
Expand Down
16 changes: 7 additions & 9 deletions nfc/include/nfc_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ typedef void (* nfc_lib_cb_resolve_t)(const void * p_ctx, const uint8_t * p_data
* @param[in, out] p_irq_priority Pointer to the interrupt priority configuration. You must
* set its value inside this function.
*
* @retval NRFX_SUCCESS If the NFC module is initialized successfully. If one
* of the arguments is invalid, an error code is returned.
* @retval 0 If the NFC module is initialized successfully. If one
* of the arguments is invalid, an error code is returned.
*/
nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t * p_irq_priority);
int nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t * p_irq_priority);


/**
Expand All @@ -75,13 +75,11 @@ nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t *
* can be used to fill the Type 2 Tag Internal Bytes.
* @param[in] nfcid1_buff_len Length of the NFCID1 buffer.
*
* @retval NRFX_SUCCESS The operation was successful.
* @retval NRFX_ERROR_INVALID_LENGTH Length of the NFCID buffer is different than
* NRFX_NFCT_NFCID1_SINGLE_SIZE,
* NRFX_NFCT_NFCID1_DOUBLE_SIZE, or
* NRFX_NFCT_NFCID1_TRIPLE_SIZE.
* @retval 0 The operation was successful.
* @retval -E2BIG Length of the NFCID buffer is different than NRFX_NFCT_NFCID1_SINGLE_SIZE,
* NRFX_NFCT_NFCID1_DOUBLE_SIZE, or NRFX_NFCT_NFCID1_TRIPLE_SIZE.
*/
nrfx_err_t nfc_platform_nfcid1_default_bytes_get(uint8_t * const p_nfcid1_buff,
int nfc_platform_nfcid1_default_bytes_get(uint8_t * const p_nfcid1_buff,
uint32_t nfcid1_buff_len);


Expand Down
1 change: 1 addition & 0 deletions nrf_802154/driver/src/nrf_802154_swi.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include <stdbool.h>

#include "nrfx.h"
#include "nrf_802154_config.h"
#if !NRF_802154_INTERNAL_SWI_IRQ_HANDLING
#include "nrf_802154_irq_handlers.h"
Expand Down
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/nrf_802154_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "nrf_802154_assert.h"
#include <stdint.h>
#include "nrfx.h"
#include <soc/nrfx_coredep.h>
#include <lib/nrfx_coredep.h>

#ifdef __STATIC_INLINE__
#undef __STATIC_INLINE__
Expand Down
Loading