Helper layer that provides the common functionality of PPI and DPPI drivers.
More...
|
enum | nrfx_gppi_channel_group_t {
NRFX_GPPI_CHANNEL_GROUP0,
NRFX_GPPI_CHANNEL_GROUP1,
NRFX_GPPI_CHANNEL_GROUP2,
NRFX_GPPI_CHANNEL_GROUP3,
NRFX_GPPI_CHANNEL_GROUP4,
NRFX_GPPI_CHANNEL_GROUP5
} |
| Generic PPI channel groups. More...
|
|
enum | nrfx_gppi_task_t {
NRFX_GPPI_TASK_CHG0_EN,
NRFX_GPPI_TASK_CHG0_DIS,
NRFX_GPPI_TASK_CHG1_EN,
NRFX_GPPI_TASK_CHG1_DIS,
NRFX_GPPI_TASK_CHG2_EN,
NRFX_GPPI_TASK_CHG2_DIS,
NRFX_GPPI_TASK_CHG3_EN,
NRFX_GPPI_TASK_CHG3_DIS,
NRFX_GPPI_TASK_CHG4_EN,
NRFX_GPPI_TASK_CHG4_DIS,
NRFX_GPPI_TASK_CHG5_EN,
NRFX_GPPI_TASK_CHG5_DIS
} |
| Generic PPI tasks. More...
|
|
|
__STATIC_INLINE bool | nrfx_gppi_channel_check (uint8_t channel) |
| Function for checking if a given channel is enabled. More...
|
|
__STATIC_INLINE void | nrfx_gppi_channels_disable_all (void) |
| Function for disabling all channels.
|
|
__STATIC_INLINE void | nrfx_gppi_channels_enable (uint32_t mask) |
| Function for enabling multiple channels. More...
|
|
__STATIC_INLINE void | nrfx_gppi_channels_disable (uint32_t mask) |
| Function for disabling multiple channels. More...
|
|
__STATIC_INLINE void | nrfx_gppi_event_endpoint_setup (uint8_t channel, uint32_t eep) |
| Function for associating a given channel with the specified event register. More...
|
|
__STATIC_INLINE void | nrfx_gppi_task_endpoint_setup (uint8_t channel, uint32_t tep) |
| Function for associating a given channel with the specified task register. More...
|
|
__STATIC_INLINE void | nrfx_gppi_channel_endpoints_setup (uint8_t channel, uint32_t eep, uint32_t tep) |
| Function for setting up the event and task endpoints for a given channel. More...
|
|
__STATIC_INLINE void | nrfx_gppi_event_endpoint_clear (uint8_t channel, uint32_t eep) |
| Function for clearing the DPPI publish configuration for a given event register or for clearing the PPI event endpoint register. More...
|
|
__STATIC_INLINE void | nrfx_gppi_task_endpoint_clear (uint8_t channel, uint32_t tep) |
| Function for clearing the DPPI subscribe configuration for a given task register or for clearing the PPI task endpoint register. More...
|
|
__STATIC_INLINE void | nrfx_gppi_fork_endpoint_setup (uint8_t channel, uint32_t fork_tep) |
| Function for setting up the task endpoint for a given PPI fork or for associating the DPPI channel with an additional task register. More...
|
|
__STATIC_INLINE void | nrfx_gppi_fork_endpoint_clear (uint8_t channel, uint32_t fork_tep) |
| Function for clearing the task endpoint for a given PPI fork or for clearing the DPPI subscribe register. More...
|
|
__STATIC_INLINE void | nrfx_gppi_channels_include_in_group (uint32_t channel_mask, nrfx_gppi_channel_group_t channel_group) |
| Function for including multiple channels in a channel group. More...
|
|
__STATIC_INLINE void | nrfx_gppi_channels_remove_from_group (uint32_t channel_mask, nrfx_gppi_channel_group_t channel_group) |
| Function for removing multiple channels from a channel group. More...
|
|
__STATIC_INLINE void | nrfx_gppi_group_clear (nrfx_gppi_channel_group_t channel_group) |
| Function for removing all channels from a channel group. More...
|
|
__STATIC_INLINE void | nrfx_gppi_group_enable (nrfx_gppi_channel_group_t channel_group) |
| Function for enabling a channel group. More...
|
|
__STATIC_INLINE void | nrfx_gppi_group_disable (nrfx_gppi_channel_group_t channel_group) |
| Function for disabling a group. More...
|
|
__STATIC_INLINE void | nrfx_gppi_task_trigger (nrfx_gppi_task_t task) |
| Function for activating a task. More...
|
|
__STATIC_INLINE uint32_t | nrfx_gppi_task_address_get (nrfx_gppi_task_t task) |
| Function for returning the address of a specific task register. More...
|
|
__STATIC_INLINE nrfx_gppi_task_t | nrfx_gppi_group_disable_task_get (nrfx_gppi_channel_group_t group) |
| Function for returning the address of a channel group disable task. More...
|
|
__STATIC_INLINE nrfx_gppi_task_t | nrfx_gppi_group_enable_task_get (nrfx_gppi_channel_group_t group) |
| Function for returning the address of a channel group enable task. More...
|
|
Helper layer that provides the common functionality of PPI and DPPI drivers.
Use PPI and DPPI drivers directly. This layer is provided only to help create generic code that can be built for SoCs equipped with either of these peripherals. When using this layer, take into account that there are significant differences between the PPI and DPPI interfaces that affect the behavior of this layer.
One difference is that PPI allows associating of one task or event with more than one channel, whereas DPPI does not allow this. In DPPI, the second association overwrites the first one. Consequently, this helper layer cannot be used in applications that need to connect a task or event to multiple channels.
Another difference is that in DPPI one channel can be associated with multiple tasks and multiple events, while in PPI this is not possible (with the exception of the association of a second task as a fork). Because of this difference, it is important to clear the previous endpoints of the channel that is to be reused with some different ones. Otherwise, the behavior of this helper layer will be different, depending on the actual interface used: in DPPI the channel configuration will be extended with the new endpoints, and in PPI the new endpoints will replace the previous ones.
◆ nrfx_gppi_channel_group_t
Generic PPI channel groups.
Enumerator |
---|
NRFX_GPPI_CHANNEL_GROUP0 | Channel group 0.
|
NRFX_GPPI_CHANNEL_GROUP1 | Channel group 1.
|
NRFX_GPPI_CHANNEL_GROUP2 | Channel group 2.
|
NRFX_GPPI_CHANNEL_GROUP3 | Channel group 3.
|
NRFX_GPPI_CHANNEL_GROUP4 | Channel group 4.
|
NRFX_GPPI_CHANNEL_GROUP5 | Channel group 5.
|
◆ nrfx_gppi_task_t
Generic PPI tasks.
Enumerator |
---|
NRFX_GPPI_TASK_CHG0_EN | Task for enabling channel group 0
|
NRFX_GPPI_TASK_CHG0_DIS | Task for disabling channel group 0
|
NRFX_GPPI_TASK_CHG1_EN | Task for enabling channel group 1
|
NRFX_GPPI_TASK_CHG1_DIS | Task for disabling channel group 1
|
NRFX_GPPI_TASK_CHG2_EN | Task for enabling channel group 2
|
NRFX_GPPI_TASK_CHG2_DIS | Task for disabling channel group 2
|
NRFX_GPPI_TASK_CHG3_EN | Task for enabling channel group 3
|
NRFX_GPPI_TASK_CHG3_DIS | Task for disabling channel group 3
|
NRFX_GPPI_TASK_CHG4_EN | Task for enabling channel group 4
|
NRFX_GPPI_TASK_CHG4_DIS | Task for disabling channel group 4
|
NRFX_GPPI_TASK_CHG5_EN | Task for enabling channel group 5
|
NRFX_GPPI_TASK_CHG5_DIS | Task for disabling channel group 5
|
◆ nrfx_gppi_channel_check()
__STATIC_INLINE bool nrfx_gppi_channel_check |
( |
uint8_t |
channel | ) |
|
Function for checking if a given channel is enabled.
- Parameters
-
[in] | channel | Channel to check. |
- Return values
-
true | The channel is enabled. |
false | The channel is not enabled. |
◆ nrfx_gppi_channel_endpoints_setup()
__STATIC_INLINE void nrfx_gppi_channel_endpoints_setup |
( |
uint8_t |
channel, |
|
|
uint32_t |
eep, |
|
|
uint32_t |
tep |
|
) |
| |
Function for setting up the event and task endpoints for a given channel.
- Parameters
-
[in] | channel | Channel to which the given endpoints are assigned. |
[in] | eep | Address of the event register. |
[in] | tep | Address of the task register. |
◆ nrfx_gppi_channels_disable()
__STATIC_INLINE void nrfx_gppi_channels_disable |
( |
uint32_t |
mask | ) |
|
Function for disabling multiple channels.
The bits in mask
value correspond to particular channels. This means that writing 1 to bit 0 disables channel 0, writing 1 to bit 1 disables channel 1, etc.
- Parameters
-
◆ nrfx_gppi_channels_enable()
__STATIC_INLINE void nrfx_gppi_channels_enable |
( |
uint32_t |
mask | ) |
|
Function for enabling multiple channels.
The bits in mask
value correspond to particular channels. This means that writing 1 to bit 0 enables channel 0, writing 1 to bit 1 enables channel 1, etc.
- Parameters
-
◆ nrfx_gppi_channels_include_in_group()
Function for including multiple channels in a channel group.
- Parameters
-
[in] | channel_mask | Channels to be included in the group. |
[in] | channel_group | Channel group. |
◆ nrfx_gppi_channels_remove_from_group()
Function for removing multiple channels from a channel group.
- Parameters
-
[in] | channel_mask | Channels to be removed from the group. |
[in] | channel_group | Channel group. |
◆ nrfx_gppi_event_endpoint_clear()
__STATIC_INLINE void nrfx_gppi_event_endpoint_clear |
( |
uint8_t |
channel, |
|
|
uint32_t |
eep |
|
) |
| |
Function for clearing the DPPI publish configuration for a given event register or for clearing the PPI event endpoint register.
- Parameters
-
[in] | channel | Channel for which to clear the event endpoint. Not used in DPPI. |
[in] | eep | Address of the event register. Not used in PPI. |
◆ nrfx_gppi_event_endpoint_setup()
__STATIC_INLINE void nrfx_gppi_event_endpoint_setup |
( |
uint8_t |
channel, |
|
|
uint32_t |
eep |
|
) |
| |
Function for associating a given channel with the specified event register.
This function sets the DPPI publish configuration for a given event or sets the PPI event endpoint register.
- Parameters
-
[in] | channel | Channel to which to assign the event. |
[in] | eep | Address of the event register. |
◆ nrfx_gppi_fork_endpoint_clear()
__STATIC_INLINE void nrfx_gppi_fork_endpoint_clear |
( |
uint8_t |
channel, |
|
|
uint32_t |
fork_tep |
|
) |
| |
Function for clearing the task endpoint for a given PPI fork or for clearing the DPPI subscribe register.
- Parameters
-
[in] | channel | Channel for which to clear the fork endpoint. Not used in DPPI. |
[in] | fork_tep | Address of the task register. Not used in PPI. |
◆ nrfx_gppi_fork_endpoint_setup()
__STATIC_INLINE void nrfx_gppi_fork_endpoint_setup |
( |
uint8_t |
channel, |
|
|
uint32_t |
fork_tep |
|
) |
| |
Function for setting up the task endpoint for a given PPI fork or for associating the DPPI channel with an additional task register.
- Parameters
-
[in] | channel | Channel to which the given fork endpoint is assigned. |
[in] | fork_tep | Address of the task register. |
◆ nrfx_gppi_group_clear()
Function for removing all channels from a channel group.
- Parameters
-
[in] | channel_group | Channel group. |
◆ nrfx_gppi_group_disable()
Function for disabling a group.
- Parameters
-
[in] | channel_group | Channel group. |
◆ nrfx_gppi_group_disable_task_get()
Function for returning the address of a channel group disable task.
- Parameters
-
- Returns
- Disable task address of the specified group.
◆ nrfx_gppi_group_enable()
Function for enabling a channel group.
- Parameters
-
[in] | channel_group | Channel group. |
◆ nrfx_gppi_group_enable_task_get()
Function for returning the address of a channel group enable task.
- Parameters
-
- Returns
- Enable task address of the specified group.
◆ nrfx_gppi_task_address_get()
Function for returning the address of a specific task register.
- Parameters
-
[in] | task | PPI or DPPI task. |
- Returns
- Address of the requested task register.
◆ nrfx_gppi_task_endpoint_clear()
__STATIC_INLINE void nrfx_gppi_task_endpoint_clear |
( |
uint8_t |
channel, |
|
|
uint32_t |
tep |
|
) |
| |
Function for clearing the DPPI subscribe configuration for a given task register or for clearing the PPI task endpoint register.
- Parameters
-
[in] | channel | Channel from which to disconnect the task enpoint. Not used in DPPI. |
[in] | tep | Address of the task register. Not used in PPI. |
◆ nrfx_gppi_task_endpoint_setup()
__STATIC_INLINE void nrfx_gppi_task_endpoint_setup |
( |
uint8_t |
channel, |
|
|
uint32_t |
tep |
|
) |
| |
Function for associating a given channel with the specified task register.
This function sets the DPPI subscribe configuration for a given task or sets the PPI task endpoint register.
- Parameters
-
[in] | channel | Channel to which to assign the task. |
[in] | tep | Address of the task register. |
◆ nrfx_gppi_task_trigger()
Function for activating a task.
- Parameters
-
[in] | task | Task to be activated. |