DPPI driver

group nrfx_dppi

Distributed Programmable Peripheral Interconnect (DPPI) allocator.

Functions

void nrfx_dppi_free(void)

Function for freeing all allocated channels and groups.

nrfx_err_t nrfx_dppi_channel_alloc(uint8_t *p_channel)

Function for allocating a DPPI channel.

This function allocates the first unused DPPI channel.

Note

To ensure the thread safety of the operation, this function uses the NRFX_CRITICAL_SECTION_ENTER and NRFX_CRITICAL_SECTION_EXIT macros. No further synchronization mechanism is needed, provided the macros are properly implemented (see nrfx_glue.h).

Parameters
  • p_channel[out] Pointer to the DPPI channel number that has been allocated.

Returns NRFX_SUCCESS

The channel was successfully allocated.

Returns NRFX_ERROR_NO_MEM

There is no available channel to be used.

nrfx_err_t nrfx_dppi_channel_free(uint8_t channel)

Function for freeing a DPPI channel.

This function also disables the chosen channel.

Note

To ensure the thread safety of the operation, this function uses the NRFX_CRITICAL_SECTION_ENTER and NRFX_CRITICAL_SECTION_EXIT macros. No further synchronization mechanism is needed, provided the macros are properly implemented (see nrfx_glue.h).

Parameters
  • channel[in] DPPI channel to be freed.

Returns NRFX_SUCCESS

The channel was successfully freed.

Returns NRFX_ERROR_INVALID_PARAM

The specified channel is not allocated.

nrfx_err_t nrfx_dppi_channel_enable(uint8_t channel)

Function for enabling a DPPI channel.

Parameters
  • channel[in] DPPI channel to be enabled.

Returns NRFX_SUCCESS

The channel was successfully enabled.

Returns NRFX_ERROR_INVALID_PARAM

The specified channel is not allocated.

nrfx_err_t nrfx_dppi_channel_disable(uint8_t channel)

Function for disabling a DPPI channel.

Parameters
  • channel[in] DPPI channel to be disabled.

Returns NRFX_SUCCESS

The channel was successfully disabled.

Returns NRFX_ERROR_INVALID_PARAM

The specified channel is not allocated.

nrfx_err_t nrfx_dppi_group_alloc(nrf_dppi_channel_group_t *p_group)

Function for allocating a DPPI channel group.

This function allocates the first unused DPPI group.

Note

To ensure the thread safety of the operation, this function uses the NRFX_CRITICAL_SECTION_ENTER and NRFX_CRITICAL_SECTION_EXIT macros. No further synchronization mechanism is needed, provided the macros are properly implemented (see nrfx_glue.h).

Parameters
  • p_group[out] Pointer to the DPPI channel group that has been allocated.

Returns NRFX_SUCCESS

The channel group was successfully allocated.

Returns NRFX_ERROR_NO_MEM

There is no available channel group to be used.

nrfx_err_t nrfx_dppi_group_free(nrf_dppi_channel_group_t group)

Function for freeing a DPPI channel group.

This function also disables the chosen group.

Note

To ensure the thread safety of the operation, this function uses the NRFX_CRITICAL_SECTION_ENTER and NRFX_CRITICAL_SECTION_EXIT macros. No further synchronization mechanism is needed, provided the macros are properly implemented (see nrfx_glue.h).

Parameters
  • group[in] DPPI channel group to be freed.

Returns NRFX_SUCCESS

The channel group was successfully freed.

Returns NRFX_ERROR_INVALID_PARAM

The specified group is not allocated.

nrfx_err_t nrfx_dppi_channel_include_in_group(uint8_t channel, nrf_dppi_channel_group_t group)

Function for including a DPPI channel in a channel group.

Warning

Channel group configuration can be modified only if subscriptions for tasks associated with this group are disabled.

Parameters
  • channel[in] DPPI channel to be added.

  • group[in] Channel group in which to include the channel.

Returns NRFX_SUCCESS

The channel was successfully included.

Returns NRFX_ERROR_INVALID_PARAM

The specified group or channel is not allocated.

nrfx_err_t nrfx_dppi_channel_remove_from_group(uint8_t channel, nrf_dppi_channel_group_t group)

Function for removing a DPPI channel from a channel group.

Warning

Channel group configuration can be modified only if subscriptions for tasks associated with this group are disabled.

Parameters
  • channel[in] DPPI channel to be removed.

  • group[in] Channel group from which to remove the channel.

Returns NRFX_SUCCESS

The channel was successfully removed.

Returns NRFX_ERROR_INVALID_PARAM

The specified group or channel is not allocated.

nrfx_err_t nrfx_dppi_group_clear(nrf_dppi_channel_group_t group)

Function for clearing a DPPI channel group.

Warning

Channel group configuration can be modified only if subscriptions for tasks associated with this group are disabled.

Parameters
  • group[in] Channel group to be cleared.

Returns NRFX_SUCCESS

The group was successfully cleared.

Returns NRFX_ERROR_INVALID_PARAM

The specified group is not allocated.

nrfx_err_t nrfx_dppi_group_enable(nrf_dppi_channel_group_t group)

Function for enabling a DPPI channel group.

Parameters
  • group[in] Channel group to be enabled.

Returns NRFX_SUCCESS

The group was successfully enabled.

Returns NRFX_ERROR_INVALID_PARAM

The specified group is not allocated.

nrfx_err_t nrfx_dppi_group_disable(nrf_dppi_channel_group_t group)

Function for disabling a DPPI channel group.

Parameters
  • group[in] Channel group to be disabled.

Returns NRFX_SUCCESS

The group was successfully disabled.

Returns NRFX_ERROR_INVALID_PARAM

The specified group is not allocated.