Lines Matching refs:group

53 static uint32_t group_to_mask(nrf_ppi_channel_group_t group)  in group_to_mask()  argument
55 return (1uL << (uint32_t) group); in group_to_mask()
111 static bool is_app_group(nrf_ppi_channel_group_t group) in is_app_group() argument
113 return ((NRFX_PPI_ALL_APP_GROUPS_MASK & group_to_mask(group)) != 0); in is_app_group()
170 static bool is_allocated_group(nrf_ppi_channel_group_t group) in is_allocated_group() argument
172 return ((m_groups_allocated & group_to_mask(group)) != 0); in is_allocated_group()
181 static void group_allocated_set(nrf_ppi_channel_group_t group) in group_allocated_set() argument
183 m_groups_allocated |= group_to_mask(group); in group_allocated_set()
192 static void group_allocated_clr(nrf_ppi_channel_group_t group) in group_allocated_clr() argument
194 m_groups_allocated &= ~group_to_mask(group); in group_allocated_clr()
210 nrf_ppi_channel_group_t group; in nrfx_ppi_free_all() local
215 for (group = NRF_PPI_CHANNEL_GROUP0; mask != 0; mask &= ~group_to_mask(group), group++) in nrfx_ppi_free_all()
217 if (mask & group_to_mask(group)) in nrfx_ppi_free_all()
219 nrf_ppi_group_clear(NRF_PPI, group); in nrfx_ppi_free_all()
380 nrf_ppi_channel_group_t group; in nrfx_ppi_group_alloc() local
385 for (group = NRF_PPI_CHANNEL_GROUP0; mask != 0; mask &= ~group_to_mask(group), group++) in nrfx_ppi_group_alloc()
388 if ((mask & group_to_mask(group)) && (!is_allocated_group(group))) in nrfx_ppi_group_alloc()
390 group_allocated_set(group); in nrfx_ppi_group_alloc()
391 *p_group = group; in nrfx_ppi_group_alloc()
397 NRFX_LOG_INFO("Allocated group: %d.", group); in nrfx_ppi_group_alloc()
407 nrfx_err_t nrfx_ppi_group_free(nrf_ppi_channel_group_t group) in nrfx_ppi_group_free() argument
411 if (!is_app_group(group)) in nrfx_ppi_group_free()
415 if (!is_allocated_group(group)) in nrfx_ppi_group_free()
421 nrf_ppi_group_disable(NRF_PPI, group); in nrfx_ppi_group_free()
423 group_allocated_clr(group); in nrfx_ppi_group_free()
431 nrfx_err_t nrfx_ppi_group_enable(nrf_ppi_channel_group_t group) in nrfx_ppi_group_enable() argument
435 if (!is_app_group(group)) in nrfx_ppi_group_enable()
439 else if (!is_allocated_group(group)) in nrfx_ppi_group_enable()
445 nrf_ppi_group_enable(NRF_PPI, group); in nrfx_ppi_group_enable()
452 nrfx_err_t nrfx_ppi_group_disable(nrf_ppi_channel_group_t group) in nrfx_ppi_group_disable() argument
456 if (!is_app_group(group)) in nrfx_ppi_group_disable()
462 nrf_ppi_group_disable(NRF_PPI, group); in nrfx_ppi_group_disable()
469 nrf_ppi_channel_group_t group) in nrfx_ppi_channels_remove_from_group() argument
473 if (!is_app_group(group)) in nrfx_ppi_channels_remove_from_group()
477 else if (!is_allocated_group(group)) in nrfx_ppi_channels_remove_from_group()
488 nrf_ppi_channels_remove_from_group(NRF_PPI, channel_mask, group); in nrfx_ppi_channels_remove_from_group()
496 nrf_ppi_channel_group_t group) in nrfx_ppi_channels_include_in_group() argument
500 if (!is_app_group(group)) in nrfx_ppi_channels_include_in_group()
504 else if (!is_allocated_group(group)) in nrfx_ppi_channels_include_in_group()
515 nrf_ppi_channels_include_in_group(NRF_PPI, channel_mask, group); in nrfx_ppi_channels_include_in_group()