Skip to content

Commit 0716cc0

Browse files
committed
nrfx: Update to version 3.8.0
Update nrfx to the recently released version. See https://github.com/NordicSemiconductor/nrfx/blob/v3.8.0/CHANGELOG.md for a list of changes that this version introduces. Origin: nrfx License: BSD 3-Clause URL: https://github.com/NordicSemiconductor/nrfx/tree/v3.8.0 commit: 4fb7ccb30a1db35c1cf48f1eac87310125ba1072 Purpose: Provide peripheral drivers for Nordic SoCs Maintained-by: External Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent 5c8d109 commit 0716cc0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4082
-374
lines changed

nrfx/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22
All notable changes to this project are documented in this file.
33

4+
## [3.8.0] - 2024-10-17
5+
### Added
6+
- Added multi-instance support in the DPPI driver.
7+
- Added multi-instance driver for the PPIB.
8+
- Added a function for interconnecting two DPPI domains in the GPPI helper.
9+
410
## [3.7.0] - 2024-09-27
511
### Added
612
- Added support for nRF54H20 Eng B.

nrfx/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ nrfx
22
####
33

44
Origin:
5-
https://github.com/NordicSemiconductor/nrfx/tree/v3.7.0
5+
https://github.com/NordicSemiconductor/nrfx/tree/v3.8.0
66

77
Status:
8-
v3.7.0
8+
v3.8.0
99

1010
Purpose:
1111
With added proper shims adapting it to Zephyr's APIs, nrfx will provide
@@ -32,7 +32,7 @@ URL:
3232
https://github.com/NordicSemiconductor/nrfx
3333

3434
commit:
35-
fa0f3fd9f372fe68c6ea763aa91e3734d6453f02
35+
4fb7ccb30a1db35c1cf48f1eac87310125ba1072
3636

3737
Maintained-by:
3838
External
@@ -41,4 +41,4 @@ License:
4141
BSD-3-Clause
4242

4343
License Link:
44-
https://github.com/NordicSemiconductor/nrfx/blob/v3.7.0/LICENSE
44+
https://github.com/NordicSemiconductor/nrfx/blob/v3.8.0/LICENSE

nrfx/doc/nrfx.doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PROJECT_NAME = "nrfx"
5050

5151
### EDIT THIS ###
5252

53-
PROJECT_NUMBER = "3.7"
53+
PROJECT_NUMBER = "3.8"
5454

5555
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5656
# for a project that appears at the top of each page and should give viewer a

nrfx/drivers/include/nrfx_dppi.h

Lines changed: 115 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,66 @@
3737
#include <nrfx.h>
3838
#include <haly/nrfy_dppi.h>
3939

40+
/* On devices with single instance (with no ID) use instance 0. */
41+
#if defined(NRF_DPPIC) && defined(NRFX_DPPI_ENABLED) && !defined(NRFX_DPPI0_ENABLED)
42+
#define NRFX_DPPI0_ENABLED 1
43+
#endif
44+
4045
/**
4146
* @defgroup nrfx_dppi DPPI allocator
4247
* @{
4348
* @ingroup nrf_dppi
4449
* @brief Distributed Programmable Peripheral Interconnect (DPPI) allocator.
4550
*/
4651

52+
/** @brief Data structure of the Distributed programmable peripheral interconnect (DPPI) driver instance. */
53+
typedef struct
54+
{
55+
NRF_DPPIC_Type * p_reg; ///< Pointer to a structure containing DPPIC registers.
56+
uint8_t drv_inst_idx; ///< Index of the driver instance. For internal use only.
57+
} nrfx_dppi_t;
58+
59+
#ifndef __NRFX_DOXYGEN__
60+
enum {
61+
/* List all enabled driver instances (in the format NRFX_\<instance_name\>_INST_IDX). */
62+
NRFX_INSTANCE_ENUM_LIST(DPPI)
63+
NRFX_DPPI_ENABLED_COUNT
64+
};
65+
#endif
66+
67+
/** @brief Macro for creating an instance of the DPPIC driver. */
68+
#define NRFX_DPPI_INSTANCE(id) \
69+
{ \
70+
.p_reg = NRFX_CONCAT(NRF_, DPPIC, id), \
71+
.drv_inst_idx = NRFX_CONCAT(NRFX_DPPI, id, _INST_IDX), \
72+
}
73+
4774
#ifdef __cplusplus
4875
extern "C" {
4976
#endif
5077

51-
/** @brief Function for freeing all allocated channels and groups. */
52-
void nrfx_dppi_free(void);
78+
#if NRFX_API_VER_AT_LEAST(3, 8, 0) || defined(__NRFX_DOXYGEN__)
79+
80+
/**
81+
* @brief Function for freeing all allocated channels and groups.
82+
*
83+
* @param[in] p_instance Pointer to the driver instance structure.
84+
*/
85+
void nrfx_dppi_free(nrfx_dppi_t const * p_instance);
5386

5487
/**
5588
* @brief Function for allocating a DPPI channel.
5689
* @details This function allocates the first unused DPPI channel.
5790
*
5891
* @note Function is thread safe as it uses @ref nrfx_flag32_alloc.
5992
*
60-
* @param[out] p_channel Pointer to the DPPI channel number that has been allocated.
93+
* @param[in] p_instance Pointer to the driver instance structure.
94+
* @param[out] p_channel Pointer to the DPPI channel number that has been allocated.
6195
*
6296
* @retval NRFX_SUCCESS The channel was successfully allocated.
6397
* @retval NRFX_ERROR_NO_MEM There is no available channel to be used.
6498
*/
65-
nrfx_err_t nrfx_dppi_channel_alloc(uint8_t * p_channel);
99+
nrfx_err_t nrfx_dppi_channel_alloc(nrfx_dppi_t const * p_instance, uint8_t * p_channel);
66100

67101
/**
68102
* @brief Function for freeing a DPPI channel.
@@ -71,125 +105,181 @@ nrfx_err_t nrfx_dppi_channel_alloc(uint8_t * p_channel);
71105
*
72106
* @note Function is thread safe as it uses @ref nrfx_flag32_free.
73107
*
74-
* @param[in] channel DPPI channel to be freed.
108+
* @param[in] p_instance Pointer to the driver instance structure.
109+
* @param[in] channel DPPI channel to be freed.
75110
*
76111
* @retval NRFX_SUCCESS The channel was successfully freed.
77112
* @retval NRFX_ERROR_INVALID_PARAM The specified channel is not allocated.
78113
*/
79-
nrfx_err_t nrfx_dppi_channel_free(uint8_t channel);
114+
nrfx_err_t nrfx_dppi_channel_free(nrfx_dppi_t const * p_instance, uint8_t channel);
80115

81116
/**
82117
* @brief Function for enabling a DPPI channel.
83118
*
84-
* @param[in] channel DPPI channel to be enabled.
119+
* @param[in] p_instance Pointer to the driver instance structure.
120+
* @param[in] channel DPPI channel to be enabled.
85121
*
86122
* @retval NRFX_SUCCESS The channel was successfully enabled.
87123
* @retval NRFX_ERROR_INVALID_PARAM The specified channel is not allocated.
88124
*/
89-
nrfx_err_t nrfx_dppi_channel_enable(uint8_t channel);
125+
nrfx_err_t nrfx_dppi_channel_enable(nrfx_dppi_t const * p_instance, uint8_t channel);
90126

91127
/**
92128
* @brief Function for disabling a DPPI channel.
93129
*
94130
* @note Disabling channel does not modify PUBLISH/SUBSCRIBE registers configured to use
95131
* that channel.
96132
*
97-
* @param[in] channel DPPI channel to be disabled.
133+
* @param[in] p_instance Pointer to the driver instance structure.
134+
* @param[in] channel DPPI channel to be disabled.
98135
*
99136
* @retval NRFX_SUCCESS The channel was successfully disabled.
100137
* @retval NRFX_ERROR_INVALID_PARAM The specified channel is not allocated.
101138
*/
102-
nrfx_err_t nrfx_dppi_channel_disable(uint8_t channel);
139+
nrfx_err_t nrfx_dppi_channel_disable(nrfx_dppi_t const * p_instance, uint8_t channel);
103140

104141
/**
105142
* @brief Function for allocating a DPPI channel group.
106143
* @details This function allocates the first unused DPPI group.
107144
*
108145
* @note Function is thread safe as it uses @ref nrfx_flag32_alloc.
109146
*
110-
* @param[out] p_group Pointer to the DPPI channel group that has been allocated.
147+
* @param[in] p_instance Pointer to the driver instance structure.
148+
* @param[out] p_group Pointer to the DPPI channel group that has been allocated.
111149
*
112150
* @retval NRFX_SUCCESS The channel group was successfully allocated.
113151
* @retval NRFX_ERROR_NO_MEM There is no available channel group to be used.
114152
*/
115-
nrfx_err_t nrfx_dppi_group_alloc(nrf_dppi_channel_group_t * p_group);
153+
nrfx_err_t nrfx_dppi_group_alloc(nrfx_dppi_t const * p_instance,
154+
nrf_dppi_channel_group_t * p_group);
116155

117156
/**
118157
* @brief Function for freeing a DPPI channel group.
119158
* @details This function also disables the chosen group.
120159
*
121160
* @note Function is thread safe as it uses @ref nrfx_flag32_free.
122161
*
123-
* @param[in] group DPPI channel group to be freed.
162+
* @param[in] p_instance Pointer to the driver instance structure.
163+
* @param[in] group DPPI channel group to be freed.
124164
*
125165
* @retval NRFX_SUCCESS The channel group was successfully freed.
126166
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
127167
*/
128-
nrfx_err_t nrfx_dppi_group_free(nrf_dppi_channel_group_t group);
168+
nrfx_err_t nrfx_dppi_group_free(nrfx_dppi_t const * p_instance, nrf_dppi_channel_group_t group);
129169

130170
/**
131171
* @brief Function for including a DPPI channel in a channel group.
132172
*
133-
* @param[in] channel DPPI channel to be added.
134-
* @param[in] group Channel group in which to include the channel.
173+
* @param[in] p_instance Pointer to the driver instance structure.
174+
* @param[in] channel DPPI channel to be added.
175+
* @param[in] group Channel group in which to include the channel.
135176
*
136177
* @warning Channel group configuration can be modified only if subscriptions for tasks
137178
* associated with this group are disabled.
138179
*
139180
* @retval NRFX_SUCCESS The channel was successfully included.
140181
* @retval NRFX_ERROR_INVALID_PARAM The specified group or channel is not allocated.
141182
*/
142-
nrfx_err_t nrfx_dppi_channel_include_in_group(uint8_t channel,
183+
nrfx_err_t nrfx_dppi_channel_include_in_group(nrfx_dppi_t const * p_instance,
184+
uint8_t channel,
143185
nrf_dppi_channel_group_t group);
144186

145187
/**
146188
* @brief Function for removing a DPPI channel from a channel group.
147189
*
148-
* @param[in] channel DPPI channel to be removed.
149-
* @param[in] group Channel group from which to remove the channel.
190+
* @param[in] p_instance Pointer to the driver instance structure.
191+
* @param[in] channel DPPI channel to be removed.
192+
* @param[in] group Channel group from which to remove the channel.
150193
*
151194
* @warning Channel group configuration can be modified only if subscriptions for tasks
152195
* associated with this group are disabled.
153196
*
154197
* @retval NRFX_SUCCESS The channel was successfully removed.
155198
* @retval NRFX_ERROR_INVALID_PARAM The specified group or channel is not allocated.
156199
*/
157-
nrfx_err_t nrfx_dppi_channel_remove_from_group(uint8_t channel,
200+
nrfx_err_t nrfx_dppi_channel_remove_from_group(nrfx_dppi_t const * p_instance,
201+
uint8_t channel,
158202
nrf_dppi_channel_group_t group);
159203

160204
/**
161205
* @brief Function for clearing a DPPI channel group.
162206
*
163-
* @param[in] group Channel group to be cleared.
207+
* @param[in] p_instance Pointer to the driver instance structure.
208+
* @param[in] group Channel group to be cleared.
164209
*
165210
* @warning Channel group configuration can be modified only if subscriptions for tasks
166211
* associated with this group are disabled.
167212
*
168213
* @retval NRFX_SUCCESS The group was successfully cleared.
169214
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
170215
*/
171-
nrfx_err_t nrfx_dppi_group_clear(nrf_dppi_channel_group_t group);
216+
nrfx_err_t nrfx_dppi_group_clear(nrfx_dppi_t const * p_instance, nrf_dppi_channel_group_t group);
172217

173218
/**
174219
* @brief Function for enabling a DPPI channel group.
175220
*
176-
* @param[in] group Channel group to be enabled.
221+
* @param[in] p_instance Pointer to the driver instance structure.
222+
* @param[in] group Channel group to be enabled.
177223
*
178224
* @retval NRFX_SUCCESS The group was successfully enabled.
179225
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
180226
*/
181-
nrfx_err_t nrfx_dppi_group_enable(nrf_dppi_channel_group_t group);
227+
nrfx_err_t nrfx_dppi_group_enable(nrfx_dppi_t const * p_instance,
228+
nrf_dppi_channel_group_t group);
182229

183230
/**
184231
* @brief Function for disabling a DPPI channel group.
185232
*
186-
* @param[in] group Channel group to be disabled.
233+
* @param[in] p_instance Pointer to the driver instance structure.
234+
* @param[in] group Channel group to be disabled.
187235
*
188236
* @retval NRFX_SUCCESS The group was successfully disabled.
189237
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
190238
*/
239+
nrfx_err_t nrfx_dppi_group_disable(nrfx_dppi_t const * p_instance,
240+
nrf_dppi_channel_group_t group);
241+
242+
#else
243+
244+
#if !defined(NRF_DPPIC_INDEX)
245+
/* Choose the instance to use in case of using deprecated single-instance driver variant. */
246+
#if defined(HALTIUM_XXAA)
247+
#define NRF_DPPIC_INDEX 130
248+
#elif defined(LUMOS_XXAA)
249+
#define NRF_DPPIC_INDEX 20
250+
#else
251+
#define NRF_DPPIC_INDEX 0
252+
#endif
253+
#endif
254+
255+
void nrfx_dppi_free(void);
256+
257+
nrfx_err_t nrfx_dppi_channel_alloc(uint8_t * p_channel);
258+
259+
nrfx_err_t nrfx_dppi_channel_free(uint8_t channel);
260+
261+
nrfx_err_t nrfx_dppi_channel_enable(uint8_t channel);
262+
263+
nrfx_err_t nrfx_dppi_channel_disable(uint8_t channel);
264+
265+
nrfx_err_t nrfx_dppi_group_alloc(nrf_dppi_channel_group_t * p_group);
266+
267+
nrfx_err_t nrfx_dppi_group_free(nrf_dppi_channel_group_t group);
268+
269+
nrfx_err_t nrfx_dppi_channel_include_in_group(uint8_t channel,
270+
nrf_dppi_channel_group_t group);
271+
272+
nrfx_err_t nrfx_dppi_channel_remove_from_group(uint8_t channel,
273+
nrf_dppi_channel_group_t group);
274+
275+
nrfx_err_t nrfx_dppi_group_clear(nrf_dppi_channel_group_t group);
276+
277+
nrfx_err_t nrfx_dppi_group_enable(nrf_dppi_channel_group_t group);
278+
191279
nrfx_err_t nrfx_dppi_group_disable(nrf_dppi_channel_group_t group);
192280

281+
#endif
282+
193283
/** @} */
194284

195285
#ifdef __cplusplus

0 commit comments

Comments
 (0)