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

Function is thread safe as it uses nrfx_flag32_alloc.

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

Return values
  • NRFX_SUCCESS – The channel was successfully allocated.

  • 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. Configuration in PUBLISH/SUBSCRIBE registers used for the channel is not cleared.

Note

Function is thread safe as it uses nrfx_flag32_free.

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

Return values
  • NRFX_SUCCESS – The channel was successfully freed.

  • 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.

Return values
  • NRFX_SUCCESS – The channel was successfully enabled.

  • 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.

Note

Disabling channel does not modify PUBLISH/SUBSCRIBE registers configured to use that channel.

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

Return values
  • NRFX_SUCCESS – The channel was successfully disabled.

  • 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

Function is thread safe as it uses nrfx_flag32_alloc.

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

Return values
  • NRFX_SUCCESS – The channel group was successfully allocated.

  • 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

Function is thread safe as it uses nrfx_flag32_free.

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

Return values
  • NRFX_SUCCESS – The channel group was successfully freed.

  • 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.

Return values
  • NRFX_SUCCESS – The channel was successfully included.

  • 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.

Return values
  • NRFX_SUCCESS – The channel was successfully removed.

  • 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.

Return values
  • NRFX_SUCCESS – The group was successfully cleared.

  • 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.

Return values
  • NRFX_SUCCESS – The group was successfully enabled.

  • 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.

Return values
  • NRFX_SUCCESS – The group was successfully disabled.

  • NRFX_ERROR_INVALID_PARAM – The specified group is not allocated.