nrfx 2.5
Enumerations | Functions
Generic PPI layer

Helper layer that provides the common functionality of PPI and DPPI drivers. More...

Enumerations

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

Functions

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

Detailed Description

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.

Enumeration Type Documentation

◆ 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

Function Documentation

◆ 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]channelChannel to check.
Return values
trueThe channel is enabled.
falseThe 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]channelChannel to which the given endpoints are assigned.
[in]eepAddress of the event register.
[in]tepAddress 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
[in]maskChannel mask.

◆ 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
[in]maskChannel mask.

◆ nrfx_gppi_channels_include_in_group()

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

Parameters
[in]channel_maskChannels to be included in the group.
[in]channel_groupChannel group.

◆ nrfx_gppi_channels_remove_from_group()

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

Parameters
[in]channel_maskChannels to be removed from the group.
[in]channel_groupChannel 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]channelChannel for which to clear the event endpoint. Not used in DPPI.
[in]eepAddress 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]channelChannel to which to assign the event.
[in]eepAddress 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]channelChannel for which to clear the fork endpoint. Not used in DPPI.
[in]fork_tepAddress 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]channelChannel to which the given fork endpoint is assigned.
[in]fork_tepAddress of the task register.

◆ nrfx_gppi_group_clear()

__STATIC_INLINE void nrfx_gppi_group_clear ( nrfx_gppi_channel_group_t  channel_group)

Function for removing all channels from a channel group.

Parameters
[in]channel_groupChannel group.

◆ nrfx_gppi_group_disable()

__STATIC_INLINE void nrfx_gppi_group_disable ( nrfx_gppi_channel_group_t  channel_group)

Function for disabling a group.

Parameters
[in]channel_groupChannel group.

◆ nrfx_gppi_group_disable_task_get()

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

Parameters
[in]groupChannel group.
Returns
Disable task address of the specified group.

◆ nrfx_gppi_group_enable()

__STATIC_INLINE void nrfx_gppi_group_enable ( nrfx_gppi_channel_group_t  channel_group)

Function for enabling a channel group.

Parameters
[in]channel_groupChannel group.

◆ nrfx_gppi_group_enable_task_get()

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

Parameters
[in]groupChannel group.
Returns
Enable task address of the specified group.

◆ nrfx_gppi_task_address_get()

__STATIC_INLINE uint32_t nrfx_gppi_task_address_get ( nrfx_gppi_task_t  task)

Function for returning the address of a specific task register.

Parameters
[in]taskPPI 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]channelChannel from which to disconnect the task enpoint. Not used in DPPI.
[in]tepAddress 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]channelChannel to which to assign the task.
[in]tepAddress of the task register.

◆ nrfx_gppi_task_trigger()

__STATIC_INLINE void nrfx_gppi_task_trigger ( nrfx_gppi_task_t  task)

Function for activating a task.

Parameters
[in]taskTask to be activated.

Documentation feedback | Developer Zone | Subscribe | Updated