| 
34 | 34 |  * definitions required by the interconnect/apb layer:  | 
35 | 35 |  * - NRFX_DPPI_PUB_CONFIG_ALLOWED_CHANNELS_MASK_BY_INST_NUM(inst_num)  | 
36 | 36 |  * - NRFX_DPPI_SUB_CONFIG_ALLOWED_CHANNELS_MASK_BY_INST_NUM(inst_num)  | 
37 |  | - * - NRFX_DPPI_PUB_OR_SUB_MASK(inst_num)  | 
 | 37 | + * - NRFX_DPPI_OWNED_MASK(inst_num)  | 
38 | 38 |  * - NRFX_DPPI_CHANNELS_SINGLE_VAR_NAME_BY_INST_NUM(inst_num)  | 
39 | 39 |  * - NRFX_INTERCONNECT_APB_GLOBAL_DPPI_DEFINE  | 
40 | 40 |  * - NRFX_INTERCONNECT_APB_LOCAL_DPPI_DEFINE  | 
41 | 41 |  * based on information from devicetree.  | 
42 | 42 |  */  | 
43 | 43 | #if	DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_dppic_global) || \  | 
44 | 44 | 	DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_dppic_local)  | 
 | 45 | + | 
 | 46 | +/* Channels masks generation. */  | 
 | 47 | +#define NRFX_CONFIG_DPPI_MASK_DT(node_id) \  | 
 | 48 | +	COND_CODE_1(DT_NODE_HAS_PROP(node_id, owned_channels), \  | 
 | 49 | +		(NRFX_CONFIG_MASK_DT(node_id, owned_channels)), \  | 
 | 50 | +		(COND_CODE_1(DT_NODE_HAS_COMPAT(node_id, nordic_nrf_dppic_local), \  | 
 | 51 | +			(BIT64_MASK(DT_PROP(node_id, channels))), (0))))  | 
 | 52 | + | 
45 | 53 | /* Source (publish) channels masks generation. */  | 
46 | 54 | #define NRFX_DPPI_PUB_CONFIG_ALLOWED_CHANNELS_MASK_BY_INST_NUM(inst_num) \  | 
47 | 55 | 	NRFX_CONFIG_MASK_DT(DT_NODELABEL(_CONCAT(dppic, inst_num)), source_channels)  | 
 | 
50 | 58 | #define NRFX_DPPI_SUB_CONFIG_ALLOWED_CHANNELS_MASK_BY_INST_NUM(inst_num) \  | 
51 | 59 | 	NRFX_CONFIG_MASK_DT(DT_NODELABEL(_CONCAT(dppic, inst_num)), sink_channels)  | 
52 | 60 | 
 
  | 
53 |  | -#define NRFX_DPPI_PUB_OR_SUB_MASK(inst_num) \  | 
54 |  | -	UTIL_OR(DT_NODE_HAS_PROP(DT_NODELABEL(_CONCAT(dppic, inst_num)), source_channels), \  | 
55 |  | -		DT_NODE_HAS_PROP(DT_NODELABEL(_CONCAT(dppic, inst_num)), sink_channels))  | 
 | 61 | +#define NRFX_DPPI_OWNED_MASK(inst_num) \  | 
 | 62 | +	UTIL_OR(DT_NODE_HAS_PROP(DT_NODELABEL(_CONCAT(dppic, inst_num)), owned_channels), \  | 
 | 63 | +		DT_NODE_HAS_PROP(DT_NODELABEL(_CONCAT(dppic, inst_num)), channels))  | 
56 | 64 | 
 
  | 
57 | 65 | /* Variables names generation. */  | 
58 | 66 | #define NRFX_CONFIG_DPPI_CHANNELS_ENTRY_NAME(node_id) _CONCAT(_CONCAT(m_, node_id), _channels)  | 
 | 
62 | 70 | /* Variables entries generation. */  | 
63 | 71 | #define NRFX_CONFIG_DPPI_CHANNELS_ENTRY(node_id) \  | 
64 | 72 | 	static nrfx_atomic_t NRFX_CONFIG_DPPI_CHANNELS_ENTRY_NAME(node_id) \  | 
65 |  | -		__attribute__((used)) = \  | 
66 |  | -		NRFX_CONFIG_MASK_DT(node_id, source_channels) | \  | 
67 |  | -		NRFX_CONFIG_MASK_DT(node_id, sink_channels);  | 
 | 73 | +		__attribute__((used)) = (uint32_t)NRFX_CONFIG_DPPI_MASK_DT(node_id);  | 
68 | 74 | #define NRFX_INTERCONNECT_APB_GLOBAL_DPPI_DEFINE \  | 
69 | 75 | 	DT_FOREACH_STATUS_OKAY(nordic_nrf_dppic_global, NRFX_CONFIG_DPPI_CHANNELS_ENTRY)  | 
70 | 76 | #define NRFX_INTERCONNECT_APB_LOCAL_DPPI_DEFINE \  | 
 | 
0 commit comments