nrfxlib API 2.8.99
Loading...
Searching...
No Matches
nrf_802154_config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017, 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
35#ifndef NRF_802154_CONFIG_H__
36#define NRF_802154_CONFIG_H__
37
38#ifdef NRF_802154_PROJECT_CONFIG
39#include NRF_802154_PROJECT_CONFIG
40#endif
41
42#include <nrfx.h>
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
66#ifndef NRF_802154_CCA_MODE_DEFAULT
67#define NRF_802154_CCA_MODE_DEFAULT NRF_RADIO_CCA_MODE_ED
68#endif
69
76#ifndef NRF_802154_CCA_ED_THRESHOLD_DEFAULT
77#define NRF_802154_CCA_ED_THRESHOLD_DEFAULT 0x14
78#endif
79
86#ifndef NRF_802154_CCA_CORR_THRESHOLD_DEFAULT
87#define NRF_802154_CCA_CORR_THRESHOLD_DEFAULT 0x14
88#endif
89
96#ifndef NRF_802154_CCA_CORR_LIMIT_DEFAULT
97#define NRF_802154_CCA_CORR_LIMIT_DEFAULT 0x02
98#endif
99
109#ifndef NRF_802154_INTERNAL_RADIO_IRQ_HANDLING
110#define NRF_802154_INTERNAL_RADIO_IRQ_HANDLING 0
111#endif
112
122#ifndef NRF_802154_INTERNAL_SWI_IRQ_HANDLING
123#define NRF_802154_INTERNAL_SWI_IRQ_HANDLING 1
124#endif
125
133#ifndef NRF_802154_IRQ_PRIORITY
134#define NRF_802154_IRQ_PRIORITY 0
135#endif
136
143#ifndef NRF_802154_SWI_PRIORITY
144#define NRF_802154_SWI_PRIORITY 4
145#endif
146
153#ifndef NRF_802154_ECB_PRIORITY
154#define NRF_802154_ECB_PRIORITY 3
155#endif
156
167#ifndef NRF_802154_USE_RAW_API
168#define NRF_802154_USE_RAW_API 1
169#endif
170
177#ifndef NRF_802154_PENDING_SHORT_ADDRESSES
178#define NRF_802154_PENDING_SHORT_ADDRESSES 10
179#endif
180
187#ifndef NRF_802154_PENDING_EXTENDED_ADDRESSES
188#define NRF_802154_PENDING_EXTENDED_ADDRESSES 10
189#endif
190
197#ifndef NRF_802154_RX_BUFFERS
198#define NRF_802154_RX_BUFFERS 16
199#endif
200
209#ifndef NRF_802154_MAX_DISREGARDABLE_NOTIFICATIONS
210#define NRF_802154_MAX_DISREGARDABLE_NOTIFICATIONS 4
211#endif
212
220#ifndef NRF_802154_NOTIFY_CRCERROR
221#define NRF_802154_NOTIFY_CRCERROR 1
222#endif
223
236#ifndef NRF_802154_FRAME_TIMESTAMP_ENABLED
237#define NRF_802154_FRAME_TIMESTAMP_ENABLED 1
238#endif
239
246#if !defined(CONFIG_NRF_802154_SL_OPENSOURCE)
247#ifndef NRF_802154_DELAYED_TRX_ENABLED
248#define NRF_802154_DELAYED_TRX_ENABLED 1
249#endif
250#endif
251
261#ifndef NRF_802154_TEST_MODES_ENABLED
262#define NRF_802154_TEST_MODES_ENABLED 0
263#endif
264
270#ifndef NRF_802154_PAN_COORD_GET_ENABLED
271#define NRF_802154_PAN_COORD_GET_ENABLED 0
272#endif
273
287#if !defined(CONFIG_NRF_802154_SL_OPENSOURCE)
288#ifndef NRF_802154_CSMA_CA_ENABLED
289#define NRF_802154_CSMA_CA_ENABLED 1
290#endif
291#endif
292
303#ifdef NRF_802154_CSMA_CA_MIN_BE
304#error "NRF_802154_CSMA_CA_MIN_BE was replaced with NRF_802154_CSMA_CA_MIN_BE_DEFAULT"
305#endif
306#ifndef NRF_802154_CSMA_CA_MIN_BE_DEFAULT
307#define NRF_802154_CSMA_CA_MIN_BE_DEFAULT 3
308#endif
309
320#ifdef NRF_802154_CSMA_CA_MAX_BE
321#error "NRF_802154_CSMA_CA_MAX_BE was replaced with NRF_802154_CSMA_CA_MAX_BE_DEFAULT"
322#endif
323#ifndef NRF_802154_CSMA_CA_MAX_BE_DEFAULT
324#define NRF_802154_CSMA_CA_MAX_BE_DEFAULT 5
325#endif
326
337#ifdef NRF_802154_CSMA_CA_MAX_CSMA_BACKOFFS
338#error \
339 "NRF_802154_CSMA_CA_MAX_CSMA_BACKOFFS was replaced with NRF_802154_CSMA_CA_MAX_CSMA_BACKOFFS_DEFAULT"
340#endif
341#ifndef NRF_802154_CSMA_CA_MAX_CSMA_BACKOFFS_DEFAULT
342#define NRF_802154_CSMA_CA_MAX_CSMA_BACKOFFS_DEFAULT 4
343#endif
344
358#ifndef NRF_802154_CSMA_CA_WAIT_FOR_TIMESLOT
359#define NRF_802154_CSMA_CA_WAIT_FOR_TIMESLOT 1
360#endif
361
374#ifndef NRF_802154_ACK_TIMEOUT_ENABLED
375#define NRF_802154_ACK_TIMEOUT_ENABLED 1
376#endif
377
384#ifndef NRF_802154_ACK_TIMEOUT_DEFAULT_TIMEOUT
385#define NRF_802154_ACK_TIMEOUT_DEFAULT_TIMEOUT 7000
386#endif
387
394#ifndef NRF_802154_PRECISE_ACK_TIMEOUT_DEFAULT_TIMEOUT
395#define NRF_802154_PRECISE_ACK_TIMEOUT_DEFAULT_TIMEOUT 210
396#endif
397
404#ifndef NRF_802154_MAX_ACK_IE_SIZE
405#define NRF_802154_MAX_ACK_IE_SIZE 16
406#endif
407
421#if !defined(CONFIG_NRF_802154_SL_OPENSOURCE)
422#ifndef NRF_802154_IFS_ENABLED
423#define NRF_802154_IFS_ENABLED 0
424#endif
425#endif
426
448#ifndef NRF_802154_STATS_COUNT_ENERGY_DETECTED_EVENTS
449#define NRF_802154_STATS_COUNT_ENERGY_DETECTED_EVENTS 1
450#endif
451
461#ifndef NRF_802154_STATS_COUNT_RECEIVED_PREAMBLES
462#define NRF_802154_STATS_COUNT_RECEIVED_PREAMBLES 1
463#endif
464
477#ifndef NRF_802154_SECURITY_KEY_STORAGE_SIZE
478#define NRF_802154_SECURITY_KEY_STORAGE_SIZE 3
479#endif
480
487#ifndef NRF_802154_SECURITY_WRITER_ENABLED
488#define NRF_802154_SECURITY_WRITER_ENABLED 1
489#endif
490
497#ifndef NRF_802154_ENCRYPTION_ENABLED
498#define NRF_802154_ENCRYPTION_ENABLED 1
499#endif
500
506#if !defined(NRF_802154_ENCRYPTION_ACCELERATOR_ECB) || defined(__DOXYGEN__)
507#if defined(NRF52_SERIES) || defined(NRF5340_XXAA) || defined(__DOXYGEN__)
508#define NRF_802154_ENCRYPTION_ACCELERATOR_ECB 1
509#elif defined(NRF54H_SERIES) || defined(NRF54L_SERIES)
510#define NRF_802154_ENCRYPTION_ACCELERATOR_ECB 0
511#endif
512#endif
513
527#ifndef NRF_802154_IE_WRITER_ENABLED
528#define NRF_802154_IE_WRITER_ENABLED 1
529#endif
530
537#ifndef NRF_802154_CARRIER_FUNCTIONS_ENABLED
538#define NRF_802154_CARRIER_FUNCTIONS_ENABLED 1
539#endif
540
547#define NRF_802154_NOTIFICATION_IMPL_DIRECT 0
548
555#define NRF_802154_NOTIFICATION_IMPL_SWI 1
556
565#ifndef NRF_802154_NOTIFICATION_IMPL
566#define NRF_802154_NOTIFICATION_IMPL NRF_802154_NOTIFICATION_IMPL_SWI
567#endif
568
575#define NRF_802154_REQUEST_IMPL_DIRECT 0
576
583#define NRF_802154_REQUEST_IMPL_SWI 1
584
593#ifndef NRF_802154_REQUEST_IMPL
594#define NRF_802154_REQUEST_IMPL NRF_802154_REQUEST_IMPL_SWI
595#endif
596
603#ifdef __cplusplus
604}
605#endif
606
607#endif // NRF_802154_CONFIG_H__