nrfxlib API 3.4.99
Loading...
Searching...
No Matches
mpsl_hwres.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
17#ifndef MPSL_HWRES_H__
18#define MPSL_HWRES_H__
19
20/* The xx_SERIES macros are defined here to keep this file independent
21 of the MDK. This allows the header file to be used in nrfx without
22 creating circular dependencies. */
23#if defined(NRF52805_XXAA) || defined(NRF52810_XXAA) || \
24 defined(NRF52811_XXAA) || defined(NRF52820_XXAA) || \
25 defined(NRF52832_XXAA) || defined(NRF52832_XXAB) || \
26 defined(NRF52833_XXAA) || defined(NRF52840_XXAA)
27 #ifndef NRF52_SERIES
28 #define NRF52_SERIES
29 #endif
30#endif
31
32#if defined(NRF5340_XXAA) || defined(NRF5340_XXAA_APPLICATION) || defined(NRF5340_XXAA_NETWORK)
33 #ifndef NRF53_SERIES
34 #define NRF53_SERIES
35 #endif
36#endif
37
38#if defined(NRF54L05_XXAA) || \
39 defined(NRF54LV10A_ENGA_XXAA) || \
40 defined(NRF54LV10A_XXAA) || \
41 defined(NRF54LC10A_XXAA) || \
42 defined(NRF54L10_XXAA) || \
43 defined(NRF54L15_XXAA) || \
44 defined(NRF54LM20A_ENGA_XXAA) || \
45 defined(NRF54LM20A_XXAA) || \
46 defined(NRF54LM20B_XXAA) || \
47 defined(NRF54LS05B_ENGA_XXAA) || \
48 defined(NRF54LS05A_XXAA) || \
49 defined(NRF54LS05B_XXAA) || \
50 defined(NRF7120_ENGA_XXAA)
51 #ifndef LUMOS_XXAA
52 #define LUMOS_XXAA
53 #endif
54#endif
55
56#if defined(NRF54H20_XXAA)
57 #ifndef NRF54H_SERIES
58 #define NRF54H_SERIES
59 #endif
60#endif
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66#ifndef MPSL_RESERVED_PPI_CHANNELS
67/* Reserved (D)PPI, PPIB and IPCT resources for the supported platforms. */
68#if defined(NRF52_SERIES)
69 #define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
70 /* This corresponds to the PPI channels 19, 30, and 31. */
71 #define MPSL_PPI_CHANNELS_USED_MASK (0xc0080000)
72#elif defined(NRF53_SERIES)
73 #define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
74 /* This corresponds to the DPPI channels 0, 1, and 2. */
75 #define MPSL_DPPIC_CHANNELS_USED_MASK (0x00000007)
76#elif defined(LUMOS_XXAA)
77 #define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
78 #define MPSL_DPPIC10_CHANNELS_USED_MASK (0x00000001)
79 #define MPSL_DPPIC20_CHANNELS_USED_MASK (0x00000001)
80 #define MPSL_PPIB11_CHANNELS_USED_MASK (0x00000001)
81 #define MPSL_PPIB21_CHANNELS_USED_MASK (0x00000001)
82#elif defined(NRF54H_SERIES)
83 #define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
84 #define MPSL_DPPIC020_CHANNELS_USED_MASK (0x00000001)
85 #define MPSL_IPCT130_CHANNELS_USED_MASK (0x00000001)
86#else
87 #error Unknown NRF series.
88#endif
89#endif /* MPSL_RESERVED_PPI_CHANNELS */
90
91#ifndef MPSL_TIMER0
92/* Defines which timer is being used by the MPSL implementation */
93#if defined(NRF52_SERIES)
94 #define MPSL_TIMER0 NRF_TIMER0
95#elif defined(NRF53_SERIES)
96 #define MPSL_TIMER0 NRF_TIMER0_NS
97#elif defined(LUMOS_XXAA)
98 #define MPSL_TIMER0 NRF_TIMER10
99#else
100 #define MPSL_TIMER0 NRF_TIMER020
101#endif
102#endif /* MPSL_TIMER0 */
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif // MPSL_HWRES_H__
109