![]() |
nRF5 SDK
v16.0.0
|
| Choose documentation: | nRF5 SDK | S112 SoftDevice API | S113 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
Programmable Peripheral Interconnect (PPI) allocator. More...
Modules | |
| PPI peripheral allocator configuration | |
Macros | |
| #define | NRFX_PPI_CHANNELS_USED 0 |
| Bitfield representing PPI channels used by external modules. | |
| #define | NRFX_PPI_GROUPS_USED 0 |
| Bitfield representing PPI groups used by external modules. | |
| #define | NRFX_PPI_ALL_APP_CHANNELS_MASK ((uint32_t)0xFFFFFFFFuL & ~(NRFX_PPI_CHANNELS_USED)) |
| Bitfield representing all PPI channels available to the application. | |
| #define | NRFX_PPI_PROG_APP_CHANNELS_MASK ((uint32_t)0x000FFFFFuL & ~(NRFX_PPI_CHANNELS_USED)) |
| Bitfield representing programmable PPI channels available to the application. | |
| #define | NRFX_PPI_ALL_APP_GROUPS_MASK (((1uL << PPI_GROUP_NUM) - 1) & ~(NRFX_PPI_GROUPS_USED)) |
| Bitfield representing all PPI groups available to the application. | |
Functions | |
| void | nrfx_ppi_free_all (void) |
| Function for uninitializing the PPI module. More... | |
| nrfx_err_t | nrfx_ppi_channel_alloc (nrf_ppi_channel_t *p_channel) |
| Function for allocating a PPI channel. More... | |
| nrfx_err_t | nrfx_ppi_channel_free (nrf_ppi_channel_t channel) |
| Function for freeing a PPI channel. More... | |
| nrfx_err_t | nrfx_ppi_channel_assign (nrf_ppi_channel_t channel, uint32_t eep, uint32_t tep) |
| Function for assigning task and event endpoints to the PPI channel. More... | |
| nrfx_err_t | nrfx_ppi_channel_fork_assign (nrf_ppi_channel_t channel, uint32_t fork_tep) |
| Function for assigning fork endpoint to the PPI channel or clearing it. More... | |
| nrfx_err_t | nrfx_ppi_channel_enable (nrf_ppi_channel_t channel) |
| Function for enabling a PPI channel. More... | |
| nrfx_err_t | nrfx_ppi_channel_disable (nrf_ppi_channel_t channel) |
| Function for disabling a PPI channel. More... | |
| nrfx_err_t | nrfx_ppi_group_alloc (nrf_ppi_channel_group_t *p_group) |
| Function for allocating a PPI channel group. More... | |
| nrfx_err_t | nrfx_ppi_group_free (nrf_ppi_channel_group_t group) |
| Function for freeing a PPI channel group. More... | |
| __STATIC_INLINE uint32_t | nrfx_ppi_channel_to_mask (nrf_ppi_channel_t channel) |
| Compute a channel mask for NRF_PPI registers. More... | |
| nrfx_err_t | nrfx_ppi_channels_include_in_group (uint32_t channel_mask, nrf_ppi_channel_group_t group) |
| Function for including multiple PPI channels in a channel group. More... | |
| __STATIC_INLINE nrfx_err_t | nrfx_ppi_channel_include_in_group (nrf_ppi_channel_t channel, nrf_ppi_channel_group_t group) |
| Function for including a PPI channel in a channel group. More... | |
| nrfx_err_t | nrfx_ppi_channels_remove_from_group (uint32_t channel_mask, nrf_ppi_channel_group_t group) |
| Function for removing multiple PPI channels from a channel group. More... | |
| __STATIC_INLINE nrfx_err_t | nrfx_ppi_channel_remove_from_group (nrf_ppi_channel_t channel, nrf_ppi_channel_group_t group) |
| Function for removing a single PPI channel from a channel group. More... | |
| __STATIC_INLINE nrfx_err_t | nrfx_ppi_group_clear (nrf_ppi_channel_group_t group) |
| Function for clearing a PPI channel group. More... | |
| nrfx_err_t | nrfx_ppi_group_enable (nrf_ppi_channel_group_t group) |
| Function for enabling a PPI channel group. More... | |
| nrfx_err_t | nrfx_ppi_group_disable (nrf_ppi_channel_group_t group) |
| Function for disabling a PPI channel group. More... | |
| __STATIC_INLINE uint32_t | nrfx_ppi_task_addr_get (nrf_ppi_task_t task) |
| Function for getting the address of a PPI task. More... | |
| __STATIC_INLINE uint32_t | nrfx_ppi_task_addr_group_enable_get (nrf_ppi_channel_group_t group) |
| Function for getting the address of the enable task of a PPI group. More... | |
| __STATIC_INLINE uint32_t | nrfx_ppi_task_addr_group_disable_get (nrf_ppi_channel_group_t group) |
| Function for getting the address of the enable task of a PPI group. More... | |
Programmable Peripheral Interconnect (PPI) allocator.
| nrfx_err_t nrfx_ppi_channel_alloc | ( | nrf_ppi_channel_t * | p_channel | ) |
Function for allocating a PPI channel.
This function allocates the first unused PPI channel.
| [out] | p_channel | Pointer to the PPI channel that has been allocated. |
| NRFX_SUCCESS | The channel was successfully allocated. |
| NRFX_ERROR_NO_MEM | There is no available channel to be used. |
| nrfx_err_t nrfx_ppi_channel_assign | ( | nrf_ppi_channel_t | channel, |
| uint32_t | eep, | ||
| uint32_t | tep | ||
| ) |
Function for assigning task and event endpoints to the PPI channel.
| [in] | channel | PPI channel to be assigned endpoints. |
| [in] | eep | Event endpoint address. |
| [in] | tep | Task endpoint address. |
| NRFX_SUCCESS | The channel was successfully assigned. |
| NRFX_ERROR_INVALID_STATE | The channel is not allocated for the user. |
| NRFX_ERROR_INVALID_PARAM | The channel is not user-configurable. |
| nrfx_err_t nrfx_ppi_channel_disable | ( | nrf_ppi_channel_t | channel | ) |
Function for disabling a PPI channel.
| [in] | channel | PPI channel to be disabled. |
| NRFX_SUCCESS | The channel was successfully disabled. |
| NRFX_ERROR_INVALID_STATE | The user-configurable channel is not allocated. |
| NRFX_ERROR_INVALID_PARAM | The channel cannot be disabled by the user. |
| nrfx_err_t nrfx_ppi_channel_enable | ( | nrf_ppi_channel_t | channel | ) |
Function for enabling a PPI channel.
| [in] | channel | PPI channel to be enabled. |
| NRFX_SUCCESS | The channel was successfully enabled. |
| NRFX_ERROR_INVALID_STATE | The user-configurable channel is not allocated. |
| NRFX_ERROR_INVALID_PARAM | The channel cannot be enabled by the user. |
| nrfx_err_t nrfx_ppi_channel_fork_assign | ( | nrf_ppi_channel_t | channel, |
| uint32_t | fork_tep | ||
| ) |
Function for assigning fork endpoint to the PPI channel or clearing it.
| [in] | channel | PPI channel to be assigned endpoints. |
| [in] | fork_tep | Fork task endpoint address or 0 to clear. |
| NRFX_SUCCESS | The channel was successfully assigned. |
| NRFX_ERROR_INVALID_STATE | The channel is not allocated for the user. |
| NRFX_ERROR_NOT_SUPPORTED | Function is not supported. |
| nrfx_err_t nrfx_ppi_channel_free | ( | nrf_ppi_channel_t | channel | ) |
Function for freeing a PPI channel.
This function also disables the chosen channel.
| [in] | channel | PPI channel to be freed. |
| NRFX_SUCCESS | The channel was successfully freed. |
| NRFX_ERROR_INVALID_PARAM | The channel is not user-configurable. |
| __STATIC_INLINE nrfx_err_t nrfx_ppi_channel_include_in_group | ( | nrf_ppi_channel_t | channel, |
| nrf_ppi_channel_group_t | group | ||
| ) |
Function for including a PPI channel in a channel group.
| [in] | channel | PPI channel to be added. |
| [in] | group | Channel group in which to include the channel. |
| NRFX_SUCCESS | The channel was successfully included. |
| NRFX_ERROR_INVALID_PARAM | Group is not an application group or channel is not an application channel. |
| NRFX_ERROR_INVALID_STATE | Group is not an allocated group. |
| __STATIC_INLINE nrfx_err_t nrfx_ppi_channel_remove_from_group | ( | nrf_ppi_channel_t | channel, |
| nrf_ppi_channel_group_t | group | ||
| ) |
Function for removing a single PPI channel from a channel group.
| [in] | channel | PPI channel to be removed. |
| [in] | group | Channel group from which to remove the channel. |
| NRFX_SUCCESS | The channel was successfully removed. |
| NRFX_ERROR_INVALID_PARAM | Group is not an application group or channel is not an application channel. |
| NRFX_ERROR_INVALID_STATE | Group is not an allocated group. |
| __STATIC_INLINE uint32_t nrfx_ppi_channel_to_mask | ( | nrf_ppi_channel_t | channel | ) |
Compute a channel mask for NRF_PPI registers.
| [in] | channel | Channel number to transform to a mask. |
| nrfx_err_t nrfx_ppi_channels_include_in_group | ( | uint32_t | channel_mask, |
| nrf_ppi_channel_group_t | group | ||
| ) |
Function for including multiple PPI channels in a channel group.
| [in] | channel_mask | PPI channels to be added. |
| [in] | group | Channel group in which to include the channels. |
| NRFX_SUCCESS | The channels was successfully included. |
| NRFX_ERROR_INVALID_PARAM | Group is not an application group or channels are not an application channels. |
| NRFX_ERROR_INVALID_STATE | Group is not an allocated group. |
| nrfx_err_t nrfx_ppi_channels_remove_from_group | ( | uint32_t | channel_mask, |
| nrf_ppi_channel_group_t | group | ||
| ) |
Function for removing multiple PPI channels from a channel group.
| [in] | channel_mask | PPI channels to be removed. |
| [in] | group | Channel group from which to remove the channels. |
| NRFX_SUCCESS | The channel was successfully removed. |
| NRFX_ERROR_INVALID_PARAM | Group is not an application group or channels are not an application channels. |
| NRFX_ERROR_INVALID_STATE | Group is not an allocated group. |
| void nrfx_ppi_free_all | ( | void | ) |
Function for uninitializing the PPI module.
This function disables all channels and clears the channel groups.
| nrfx_err_t nrfx_ppi_group_alloc | ( | nrf_ppi_channel_group_t * | p_group | ) |
Function for allocating a PPI channel group.
This function allocates the first unused PPI group.
| [out] | p_group | Pointer to the PPI channel group that has been allocated. |
| NRFX_SUCCESS | The channel group was successfully allocated. |
| NRFX_ERROR_NO_MEM | There is no available channel group to be used. |
| __STATIC_INLINE nrfx_err_t nrfx_ppi_group_clear | ( | nrf_ppi_channel_group_t | group | ) |
Function for clearing a PPI channel group.
| [in] | group | Channel group to be cleared. |
| NRFX_SUCCESS | The group was successfully cleared. |
| NRFX_ERROR_INVALID_PARAM | Group is not an application group. |
| NRFX_ERROR_INVALID_STATE | Group is not an allocated group. |
| nrfx_err_t nrfx_ppi_group_disable | ( | nrf_ppi_channel_group_t | group | ) |
Function for disabling a PPI channel group.
| [in] | group | Channel group to be disabled. |
| NRFX_SUCCESS | The group was successfully disabled. |
| NRFX_ERROR_INVALID_PARAM | Group is not an application group. |
| NRFX_ERROR_INVALID_STATE | Group is not an allocated group. |
| nrfx_err_t nrfx_ppi_group_enable | ( | nrf_ppi_channel_group_t | group | ) |
Function for enabling a PPI channel group.
| [in] | group | Channel group to be enabled. |
| NRFX_SUCCESS | The group was successfully enabled. |
| NRFX_ERROR_INVALID_PARAM | Group is not an application group. |
| NRFX_ERROR_INVALID_STATE | Group is not an allocated group. |
| nrfx_err_t nrfx_ppi_group_free | ( | nrf_ppi_channel_group_t | group | ) |
Function for freeing a PPI channel group.
This function also disables the chosen group.
| [in] | group | PPI channel group to be freed. |
| NRFX_SUCCESS | The channel group was successfully freed. |
| NRFX_ERROR_INVALID_PARAM | The channel group is not user-configurable. |
| __STATIC_INLINE uint32_t nrfx_ppi_task_addr_get | ( | nrf_ppi_task_t | task | ) |
Function for getting the address of a PPI task.
| [in] | task | Task. |
| __STATIC_INLINE uint32_t nrfx_ppi_task_addr_group_disable_get | ( | nrf_ppi_channel_group_t | group | ) |
Function for getting the address of the enable task of a PPI group.
| [in] | group | PPI channel group |
| __STATIC_INLINE uint32_t nrfx_ppi_task_addr_group_enable_get | ( | nrf_ppi_channel_group_t | group | ) |
Function for getting the address of the enable task of a PPI group.
| [in] | group | PPI channel group |