nrfxlib API 0.1.0
Loading...
Searching...
No Matches
nrf_802154_peripherals.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019, Nordic Semiconductor ASA
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
18 * contributors may be used to endorse or promote products derived from this
19 * software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
34
40#ifndef NRF_802154_PERIPHERALS_H__
41#define NRF_802154_PERIPHERALS_H__
42
43#include <nrfx.h>
44#include "nrf_802154_config.h"
45#include "nrf_802154_debug.h"
47
48#if defined(NRF52_SERIES)
50#elif defined(NRF5340_XXAA)
52#elif defined(NRF54L_SERIES)
54#elif defined(NRF54H_SERIES)
56#endif
57
58#ifdef NRF_802154_USE_INTERNAL_INCLUDES
59#include "nrf_802154_peripherals_internal.h"
60#endif
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
72#ifndef NRF_802154_HIGH_PRECISION_TIMER_INSTANCE_NO
73#define NRF_802154_HIGH_PRECISION_TIMER_INSTANCE_NO 1
74#endif
75
82#define NRF_802154_HIGH_PRECISION_TIMER_INSTANCE \
83 NRFX_CONCAT_2(NRF_TIMER, NRF_802154_HIGH_PRECISION_TIMER_INSTANCE_NO)
84
91#ifndef NRF_802154_TIMER_INSTANCE_NO
92#define NRF_802154_TIMER_INSTANCE_NO 0
93#endif
94
101#define NRF_802154_TIMER_INSTANCE \
102 NRFX_CONCAT_2(NRF_TIMER, NRF_802154_TIMER_INSTANCE_NO)
103
113#define NRF_802154_RTC_INSTANCE NRFX_CONCAT_2(NRF_RTC, NRF_802154_RTC_INSTANCE_NO)
114
124#define NRF_802154_RTC_IRQ_HANDLER NRFX_CONCAT_3(RTC, NRF_802154_RTC_INSTANCE_NO, _IRQHandler)
125
135#define NRF_802154_RTC_IRQN NRFX_CONCAT_3(RTC, NRF_802154_RTC_INSTANCE_NO, _IRQn)
136
142#ifndef NRF_802154_TIMERS_USED_MASK
143#define NRF_802154_TIMERS_USED_MASK ((1 << NRF_802154_HIGH_PRECISION_TIMER_INSTANCE_NO) | \
144 (1 << NRF_802154_TIMER_INSTANCE_NO))
145#endif // NRF_802154_TIMERS_USED_MASK
146
152#ifndef NRF_802154_RTC_USED_MASK
153#define NRF_802154_RTC_USED_MASK (1 << NRF_802154_RTC_INSTANCE_NO)
154#endif
155
161#ifndef NRF_802154_GPIO_PINS_USED_MASK
162#define NRF_802154_GPIO_PINS_USED_MASK NRF_802154_DEBUG_PINS_USED_MASK
163#endif // NRF_802154_GPIO_PINS_USED_MASK
164
170#ifndef NRF_802154_GPIOTE_CHANNELS_USED_MASK
171#define NRF_802154_GPIOTE_CHANNELS_USED_MASK NRF_802154_DEBUG_GPIOTE_CHANNELS_USED_MASK
172#endif // NRF_802154_GPIOTE_CHANNELS_USED_MASK
173
181#if NRF_802154_NOTIFICATION_IMPL == NRF_802154_NOTIFICATION_IMPL_SWI
188#ifndef NRF_802154_EGU_NOTIFICATION_CHANNEL_NO
189#define NRF_802154_EGU_NOTIFICATION_CHANNEL_NO 0
190#endif // NRF_802154_EGU_NOTIFICATION_SWI_CHANNEL_NO
191
192#define NRF_802154_EGU_NOTIFICATION_USED_CHANNELS_MASK \
193 (1U << NRF_802154_EGU_NOTIFICATION_CHANNEL_NO)
194#else
195#define NRF_802154_EGU_NOTIFICATION_USED_CHANNELS_MASK 0U
196#endif
197
205#if NRF_802154_REQUEST_IMPL == NRF_802154_REQUEST_IMPL_SWI
212#ifndef NRF_802154_EGU_REQUEST_CHANNEL_NO
213#define NRF_802154_EGU_REQUEST_CHANNEL_NO 2
214#endif // NRF_802154_EGU_REQUEST_CHANNEL_NO
215#define NRF_802154_EGU_REQUEST_USED_CHANNELS_MASK (1U << NRF_802154_EGU_REQUEST_CHANNEL_NO)
216#else
217#define NRF_802154_EGU_REQUEST_USED_CHANNELS_MASK 0U
218#endif
219
227#define NRF_802154_EGU_SYNC_CHANNEL_NO 3
228
235#define NRF_802154_EGU_SYNC_USED_CHANNELS_MASK (1U << NRF_802154_EGU_SYNC_CHANNEL_NO)
236
242#define NRF_802154_EGU_RAMP_UP_CHANNEL_NO 15
243
250#define NRF_802154_EGU_RAMP_UP_USED_CHANNELS_MASK (1U << NRF_802154_EGU_RAMP_UP_CHANNEL_NO)
251
257#define NRF_802154_EGU_RAMP_UP_EVENT NRFX_CONCAT_2(NRF_EGU_EVENT_TRIGGERED, \
258 NRF_802154_EGU_RAMP_UP_CHANNEL_NO)
259
265#define NRF_802154_EGU_RAMP_UP_TASK NRFX_CONCAT_2(NRF_EGU_TASK_TRIGGER, \
266 NRF_802154_EGU_RAMP_UP_CHANNEL_NO)
267
274#define NRF_802154_EGU_USED_CHANNELS_MASK \
275 (NRF_802154_EGU_NOTIFICATION_USED_CHANNELS_MASK | \
276 NRF_802154_EGU_REQUEST_USED_CHANNELS_MASK | \
277 NRF_802154_EGU_SYNC_USED_CHANNELS_MASK | \
278 NRF_802154_EGU_RAMP_UP_USED_CHANNELS_MASK | \
279 NRF_802154_SL_EGU_USED_CHANNELS_MASK)
280
281#ifdef __cplusplus
282}
283#endif
284
285#endif // NRF_802154_PERIPHERALS_H__