nRF5 SDK v16.0.0
Enumerations | Functions
PPI HAL

Hardware access layer (HAL) for managing the Programmable Peripheral Interconnect (PPI) channels. More...

Enumerations

enum  nrf_ppi_channel_t {
  NRF_PPI_CHANNEL0 = PPI_CHEN_CH0_Pos,
  NRF_PPI_CHANNEL1 = PPI_CHEN_CH1_Pos,
  NRF_PPI_CHANNEL2 = PPI_CHEN_CH2_Pos,
  NRF_PPI_CHANNEL3 = PPI_CHEN_CH3_Pos,
  NRF_PPI_CHANNEL4 = PPI_CHEN_CH4_Pos,
  NRF_PPI_CHANNEL5 = PPI_CHEN_CH5_Pos,
  NRF_PPI_CHANNEL6 = PPI_CHEN_CH6_Pos,
  NRF_PPI_CHANNEL7 = PPI_CHEN_CH7_Pos,
  NRF_PPI_CHANNEL8 = PPI_CHEN_CH8_Pos,
  NRF_PPI_CHANNEL9 = PPI_CHEN_CH9_Pos,
  NRF_PPI_CHANNEL10 = PPI_CHEN_CH10_Pos,
  NRF_PPI_CHANNEL11 = PPI_CHEN_CH11_Pos,
  NRF_PPI_CHANNEL12 = PPI_CHEN_CH12_Pos,
  NRF_PPI_CHANNEL13 = PPI_CHEN_CH13_Pos,
  NRF_PPI_CHANNEL14 = PPI_CHEN_CH14_Pos,
  NRF_PPI_CHANNEL15 = PPI_CHEN_CH15_Pos,
  NRF_PPI_CHANNEL16 = PPI_CHEN_CH16_Pos,
  NRF_PPI_CHANNEL17 = PPI_CHEN_CH17_Pos,
  NRF_PPI_CHANNEL18 = PPI_CHEN_CH18_Pos,
  NRF_PPI_CHANNEL19 = PPI_CHEN_CH19_Pos,
  NRF_PPI_CHANNEL20 = PPI_CHEN_CH20_Pos,
  NRF_PPI_CHANNEL21 = PPI_CHEN_CH21_Pos,
  NRF_PPI_CHANNEL22 = PPI_CHEN_CH22_Pos,
  NRF_PPI_CHANNEL23 = PPI_CHEN_CH23_Pos,
  NRF_PPI_CHANNEL24 = PPI_CHEN_CH24_Pos,
  NRF_PPI_CHANNEL25 = PPI_CHEN_CH25_Pos,
  NRF_PPI_CHANNEL26 = PPI_CHEN_CH26_Pos,
  NRF_PPI_CHANNEL27 = PPI_CHEN_CH27_Pos,
  NRF_PPI_CHANNEL28 = PPI_CHEN_CH28_Pos,
  NRF_PPI_CHANNEL29 = PPI_CHEN_CH29_Pos,
  NRF_PPI_CHANNEL30 = PPI_CHEN_CH30_Pos,
  NRF_PPI_CHANNEL31 = PPI_CHEN_CH31_Pos
}
 PPI channels. More...
 
enum  nrf_ppi_channel_group_t {
  NRF_PPI_CHANNEL_GROUP0 = 0,
  NRF_PPI_CHANNEL_GROUP1 = 1,
  NRF_PPI_CHANNEL_GROUP2 = 2,
  NRF_PPI_CHANNEL_GROUP3 = 3,
  NRF_PPI_CHANNEL_GROUP4 = 4,
  NRF_PPI_CHANNEL_GROUP5 = 5
}
 PPI channel groups. More...
 
enum  nrf_ppi_channel_include_t {
  NRF_PPI_CHANNEL_EXCLUDE = PPI_CHG_CH0_Excluded,
  NRF_PPI_CHANNEL_INCLUDE = PPI_CHG_CH0_Included
}
 Definition of whether a PPI channel belongs to a group. More...
 
enum  nrf_ppi_channel_enable_t {
  NRF_PPI_CHANNEL_DISABLED = PPI_CHEN_CH0_Disabled,
  NRF_PPI_CHANNEL_ENABLED = PPI_CHEN_CH0_Enabled
}
 Definition of whether a PPI channel is enabled. More...
 
enum  nrf_ppi_task_t {
  NRF_PPI_TASK_CHG0_EN = offsetof(NRF_PPI_Type, TASKS_CHG[0].EN),
  NRF_PPI_TASK_CHG0_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[0].DIS),
  NRF_PPI_TASK_CHG1_EN = offsetof(NRF_PPI_Type, TASKS_CHG[1].EN),
  NRF_PPI_TASK_CHG1_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[1].DIS),
  NRF_PPI_TASK_CHG2_EN = offsetof(NRF_PPI_Type, TASKS_CHG[2].EN),
  NRF_PPI_TASK_CHG2_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[2].DIS),
  NRF_PPI_TASK_CHG3_EN = offsetof(NRF_PPI_Type, TASKS_CHG[3].EN),
  NRF_PPI_TASK_CHG3_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[3].DIS),
  NRF_PPI_TASK_CHG4_EN = offsetof(NRF_PPI_Type, TASKS_CHG[4].EN),
  NRF_PPI_TASK_CHG4_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[4].DIS),
  NRF_PPI_TASK_CHG5_EN = offsetof(NRF_PPI_Type, TASKS_CHG[5].EN),
  NRF_PPI_TASK_CHG5_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[5].DIS)
}
 PPI tasks. More...
 

Functions

__STATIC_INLINE void nrf_ppi_channel_enable (nrf_ppi_channel_t channel)
 Function for enabling a given PPI channel. More...
 
__STATIC_INLINE void nrf_ppi_channel_disable (nrf_ppi_channel_t channel)
 Function for disabling a given PPI channel. More...
 
__STATIC_INLINE
nrf_ppi_channel_enable_t 
nrf_ppi_channel_enable_get (nrf_ppi_channel_t channel)
 Function for checking if a given PPI channel is enabled. More...
 
__STATIC_INLINE void nrf_ppi_channel_disable_all (void)
 Function for disabling all PPI channels.
 
__STATIC_INLINE void nrf_ppi_channels_enable (uint32_t mask)
 Function for enabling multiple PPI channels. More...
 
__STATIC_INLINE void nrf_ppi_channels_disable (uint32_t mask)
 Function for disabling multiple PPI channels. More...
 
__STATIC_INLINE void nrf_ppi_channel_endpoint_setup (nrf_ppi_channel_t channel, uint32_t eep, uint32_t tep)
 Function for setting up event and task endpoints for a given PPI channel. More...
 
__STATIC_INLINE void nrf_ppi_event_endpoint_setup (nrf_ppi_channel_t channel, uint32_t eep)
 Function for setting up the event endpoint for a given PPI channel. More...
 
__STATIC_INLINE void nrf_ppi_task_endpoint_setup (nrf_ppi_channel_t channel, uint32_t tep)
 Function for setting up the task endpoint for a given PPI channel. More...
 
__STATIC_INLINE void nrf_ppi_fork_endpoint_setup (nrf_ppi_channel_t channel, uint32_t fork_tep)
 Function for setting up task endpoint for a given PPI fork. More...
 
__STATIC_INLINE void nrf_ppi_channel_and_fork_endpoint_setup (nrf_ppi_channel_t channel, uint32_t eep, uint32_t tep, uint32_t fork_tep)
 Function for setting up event and task endpoints for a given PPI channel and fork. More...
 
__STATIC_INLINE void nrf_ppi_channel_include_in_group (nrf_ppi_channel_t channel, nrf_ppi_channel_group_t channel_group)
 Function for including a PPI channel in a channel group. More...
 
__STATIC_INLINE void nrf_ppi_channels_include_in_group (uint32_t channel_mask, nrf_ppi_channel_group_t channel_group)
 Function for including multiple PPI channels in a channel group. More...
 
__STATIC_INLINE void nrf_ppi_channel_remove_from_group (nrf_ppi_channel_t channel, nrf_ppi_channel_group_t channel_group)
 Function for removing a PPI channel from a channel group. More...
 
__STATIC_INLINE void nrf_ppi_channels_remove_from_group (uint32_t channel_mask, nrf_ppi_channel_group_t channel_group)
 Function for removing multiple PPI channels from a channel group. More...
 
__STATIC_INLINE void nrf_ppi_channel_group_clear (nrf_ppi_channel_group_t group)
 Function for removing all PPI channels from a channel group. More...
 
__STATIC_INLINE void nrf_ppi_group_enable (nrf_ppi_channel_group_t group)
 Function for enabling a channel group. More...
 
__STATIC_INLINE void nrf_ppi_group_disable (nrf_ppi_channel_group_t group)
 Function for disabling a channel group. More...
 
__STATIC_INLINE void nrf_ppi_task_trigger (nrf_ppi_task_t ppi_task)
 Function for setting a PPI task. More...
 
__STATIC_INLINE uint32_t * nrf_ppi_task_address_get (nrf_ppi_task_t ppi_task)
 Function for getting the address of the specified PPI task register. More...
 
__STATIC_INLINE uint32_t * nrf_ppi_task_group_enable_address_get (nrf_ppi_channel_group_t group)
 Function for getting the PPI enable task address of the specified group. More...
 
__STATIC_INLINE uint32_t * nrf_ppi_task_group_disable_address_get (nrf_ppi_channel_group_t group)
 Function for getting the PPI disable task address of the specified group. More...
 
__STATIC_INLINE nrf_ppi_task_t nrf_ppi_group_enable_task_get (uint8_t index)
 Function for getting the ENABLE task associated with the specified channel group. More...
 
__STATIC_INLINE nrf_ppi_task_t nrf_ppi_group_disable_task_get (uint8_t index)
 Function for getting the DISABLE task associated with the specified channel group. More...
 

Detailed Description

Hardware access layer (HAL) for managing the Programmable Peripheral Interconnect (PPI) channels.

Enumeration Type Documentation

Definition of whether a PPI channel is enabled.

Enumerator
NRF_PPI_CHANNEL_DISABLED 

Channel disabled.

NRF_PPI_CHANNEL_ENABLED 

Channel enabled.

PPI channel groups.

Enumerator
NRF_PPI_CHANNEL_GROUP0 

Channel group 0.

NRF_PPI_CHANNEL_GROUP1 

Channel group 1.

NRF_PPI_CHANNEL_GROUP2 

Channel group 2.

NRF_PPI_CHANNEL_GROUP3 

Channel group 3.

NRF_PPI_CHANNEL_GROUP4 

Channel group 4.

NRF_PPI_CHANNEL_GROUP5 

Channel group 5.

Definition of whether a PPI channel belongs to a group.

Enumerator
NRF_PPI_CHANNEL_EXCLUDE 

Channel excluded from a group.

NRF_PPI_CHANNEL_INCLUDE 

Channel included in a group.

PPI channels.

Enumerator
NRF_PPI_CHANNEL0 

Channel 0.

NRF_PPI_CHANNEL1 

Channel 1.

NRF_PPI_CHANNEL2 

Channel 2.

NRF_PPI_CHANNEL3 

Channel 3.

NRF_PPI_CHANNEL4 

Channel 4.

NRF_PPI_CHANNEL5 

Channel 5.

NRF_PPI_CHANNEL6 

Channel 6.

NRF_PPI_CHANNEL7 

Channel 7.

NRF_PPI_CHANNEL8 

Channel 8.

NRF_PPI_CHANNEL9 

Channel 9.

NRF_PPI_CHANNEL10 

Channel 10.

NRF_PPI_CHANNEL11 

Channel 11.

NRF_PPI_CHANNEL12 

Channel 12.

NRF_PPI_CHANNEL13 

Channel 13.

NRF_PPI_CHANNEL14 

Channel 14.

NRF_PPI_CHANNEL15 

Channel 15.

NRF_PPI_CHANNEL16 

Channel 16.

NRF_PPI_CHANNEL17 

Channel 17.

NRF_PPI_CHANNEL18 

Channel 18.

NRF_PPI_CHANNEL19 

Channel 19.

NRF_PPI_CHANNEL20 

Channel 20.

NRF_PPI_CHANNEL21 

Channel 21.

NRF_PPI_CHANNEL22 

Channel 22.

NRF_PPI_CHANNEL23 

Channel 23.

NRF_PPI_CHANNEL24 

Channel 24.

NRF_PPI_CHANNEL25 

Channel 25.

NRF_PPI_CHANNEL26 

Channel 26.

NRF_PPI_CHANNEL27 

Channel 27.

NRF_PPI_CHANNEL28 

Channel 28.

NRF_PPI_CHANNEL29 

Channel 29.

NRF_PPI_CHANNEL30 

Channel 30.

NRF_PPI_CHANNEL31 

Channel 31.

PPI tasks.

Enumerator
NRF_PPI_TASK_CHG0_EN 

Task for enabling channel group 0.

NRF_PPI_TASK_CHG0_DIS 

Task for disabling channel group 0.

NRF_PPI_TASK_CHG1_EN 

Task for enabling channel group 1.

NRF_PPI_TASK_CHG1_DIS 

Task for disabling channel group 1.

NRF_PPI_TASK_CHG2_EN 

Task for enabling channel group 2.

NRF_PPI_TASK_CHG2_DIS 

Task for disabling channel group 2.

NRF_PPI_TASK_CHG3_EN 

Task for enabling channel group 3.

NRF_PPI_TASK_CHG3_DIS 

Task for disabling channel group 3.

NRF_PPI_TASK_CHG4_EN 

Task for enabling channel group 4.

NRF_PPI_TASK_CHG4_DIS 

Task for disabling channel group 4.

NRF_PPI_TASK_CHG5_EN 

Task for enabling channel group 5.

NRF_PPI_TASK_CHG5_DIS 

Task for disabling channel group 5.

Function Documentation

__STATIC_INLINE void nrf_ppi_channel_and_fork_endpoint_setup ( nrf_ppi_channel_t  channel,
uint32_t  eep,
uint32_t  tep,
uint32_t  fork_tep 
)

Function for setting up event and task endpoints for a given PPI channel and fork.

Parameters
[in]eepEvent register address.
[in]tepTask register address.
[in]fork_tepFork task register address (register value).
[in]channelChannel to which the given endpoints are assigned.
__STATIC_INLINE void nrf_ppi_channel_disable ( nrf_ppi_channel_t  channel)

Function for disabling a given PPI channel.

This function disables only one channel.

Parameters
[in]channelChannel to be disabled.
__STATIC_INLINE void nrf_ppi_channel_enable ( nrf_ppi_channel_t  channel)

Function for enabling a given PPI channel.

This function enables only one channel.

Parameters
[in]channelChannel to be enabled.
__STATIC_INLINE nrf_ppi_channel_enable_t nrf_ppi_channel_enable_get ( nrf_ppi_channel_t  channel)

Function for checking if a given PPI channel is enabled.

This function checks only one channel.

Parameters
[in]channelChannel to be checked.
Return values
NRF_PPI_CHANNEL_ENABLEDThe channel is enabled.
NRF_PPI_CHANNEL_DISABLEDThe channel is not enabled.
__STATIC_INLINE void nrf_ppi_channel_endpoint_setup ( nrf_ppi_channel_t  channel,
uint32_t  eep,
uint32_t  tep 
)

Function for setting up event and task endpoints for a given PPI channel.

Parameters
[in]eepEvent register address.
[in]tepTask register address.
[in]channelChannel to which the given endpoints are assigned.
__STATIC_INLINE void nrf_ppi_channel_group_clear ( nrf_ppi_channel_group_t  group)

Function for removing all PPI channels from a channel group.

Parameters
[in]groupChannel group.
__STATIC_INLINE void nrf_ppi_channel_include_in_group ( nrf_ppi_channel_t  channel,
nrf_ppi_channel_group_t  channel_group 
)

Function for including a PPI channel in a channel group.

This function adds only one channel to the group.

Parameters
[in]channelChannel to be included in the group.
[in]channel_groupChannel group.
__STATIC_INLINE void nrf_ppi_channel_remove_from_group ( nrf_ppi_channel_t  channel,
nrf_ppi_channel_group_t  channel_group 
)

Function for removing a PPI channel from a channel group.

This function removes only one channel from the group.

Parameters
[in]channelChannel to be removed from the group.
[in]channel_groupChannel group.
__STATIC_INLINE void nrf_ppi_channels_disable ( uint32_t  mask)

Function for disabling multiple PPI channels.

Parameters
[in]maskChannel mask.
__STATIC_INLINE void nrf_ppi_channels_enable ( uint32_t  mask)

Function for enabling multiple PPI channels.

Parameters
[in]maskChannel mask.
__STATIC_INLINE void nrf_ppi_channels_include_in_group ( uint32_t  channel_mask,
nrf_ppi_channel_group_t  channel_group 
)

Function for including multiple PPI channels in a channel group.

This function adds all specified channels to the group.

Parameters
[in]channel_maskChannels to be included in the group.
[in]channel_groupChannel group.
__STATIC_INLINE void nrf_ppi_channels_remove_from_group ( uint32_t  channel_mask,
nrf_ppi_channel_group_t  channel_group 
)

Function for removing multiple PPI channels from a channel group.

This function removes all specified channels from the group.

Parameters
[in]channel_maskChannels to be removed from the group.
[in]channel_groupChannel group.
__STATIC_INLINE void nrf_ppi_event_endpoint_setup ( nrf_ppi_channel_t  channel,
uint32_t  eep 
)

Function for setting up the event endpoint for a given PPI channel.

Parameters
[in]eepEvent register address.
[in]channelChannel to which the given endpoint is assigned.
__STATIC_INLINE void nrf_ppi_fork_endpoint_setup ( nrf_ppi_channel_t  channel,
uint32_t  fork_tep 
)

Function for setting up task endpoint for a given PPI fork.

Parameters
[in]fork_tepTask register address.
[in]channelChannel to which the given fork endpoint is assigned.
__STATIC_INLINE void nrf_ppi_group_disable ( nrf_ppi_channel_group_t  group)

Function for disabling a channel group.

Parameters
[in]groupChannel group.
__STATIC_INLINE nrf_ppi_task_t nrf_ppi_group_disable_task_get ( uint8_t  index)

Function for getting the DISABLE task associated with the specified channel group.

Parameters
[in]indexChannel group index.
Returns
Requested DISABLE task.
__STATIC_INLINE void nrf_ppi_group_enable ( nrf_ppi_channel_group_t  group)

Function for enabling a channel group.

Parameters
[in]groupChannel group.
__STATIC_INLINE nrf_ppi_task_t nrf_ppi_group_enable_task_get ( uint8_t  index)

Function for getting the ENABLE task associated with the specified channel group.

Parameters
[in]indexChannel group index.
Returns
Requested ENABLE task.
__STATIC_INLINE uint32_t* nrf_ppi_task_address_get ( nrf_ppi_task_t  ppi_task)

Function for getting the address of the specified PPI task register.

Parameters
[in]ppi_taskPPI task.
Returns
Address of the requested PPI task register.
__STATIC_INLINE void nrf_ppi_task_endpoint_setup ( nrf_ppi_channel_t  channel,
uint32_t  tep 
)

Function for setting up the task endpoint for a given PPI channel.

Parameters
[in]tepTask register address.
[in]channelChannel to which the given endpoint is assigned.
__STATIC_INLINE uint32_t* nrf_ppi_task_group_disable_address_get ( nrf_ppi_channel_group_t  group)

Function for getting the PPI disable task address of the specified group.

Parameters
[in]groupPPI group.
Returns
PPI disable task address of the specified group.
__STATIC_INLINE uint32_t* nrf_ppi_task_group_enable_address_get ( nrf_ppi_channel_group_t  group)

Function for getting the PPI enable task address of the specified group.

Parameters
[in]groupPPI group.
Returns
PPI enable task address of the specified group.
__STATIC_INLINE void nrf_ppi_task_trigger ( nrf_ppi_task_t  ppi_task)

Function for setting a PPI task.

Parameters
[in]ppi_taskPPI task to be set.

Documentation feedback | Developer Zone | Subscribe | Updated