PPI HAL
- group nrf_ppi_hal
Hardware access layer (HAL) for managing the Programmable Peripheral Interconnect (PPI) channels.
Enums
-
enum nrf_ppi_channel_t
PPI channels.
Values:
-
enumerator NRF_PPI_CHANNEL0
Channel 0.
-
enumerator NRF_PPI_CHANNEL1
Channel 1.
-
enumerator NRF_PPI_CHANNEL2
Channel 2.
-
enumerator NRF_PPI_CHANNEL3
Channel 3.
-
enumerator NRF_PPI_CHANNEL4
Channel 4.
-
enumerator NRF_PPI_CHANNEL5
Channel 5.
-
enumerator NRF_PPI_CHANNEL6
Channel 6.
-
enumerator NRF_PPI_CHANNEL7
Channel 7.
-
enumerator NRF_PPI_CHANNEL8
Channel 8.
-
enumerator NRF_PPI_CHANNEL9
Channel 9.
-
enumerator NRF_PPI_CHANNEL10
Channel 10.
-
enumerator NRF_PPI_CHANNEL11
Channel 11.
-
enumerator NRF_PPI_CHANNEL12
Channel 12.
-
enumerator NRF_PPI_CHANNEL13
Channel 13.
-
enumerator NRF_PPI_CHANNEL14
Channel 14.
-
enumerator NRF_PPI_CHANNEL15
Channel 15.
-
enumerator NRF_PPI_CHANNEL16
Channel 16.
-
enumerator NRF_PPI_CHANNEL17
Channel 17.
-
enumerator NRF_PPI_CHANNEL18
Channel 18.
-
enumerator NRF_PPI_CHANNEL19
Channel 19.
-
enumerator NRF_PPI_CHANNEL20
Channel 20.
-
enumerator NRF_PPI_CHANNEL21
Channel 21.
-
enumerator NRF_PPI_CHANNEL22
Channel 22.
-
enumerator NRF_PPI_CHANNEL23
Channel 23.
-
enumerator NRF_PPI_CHANNEL24
Channel 24.
-
enumerator NRF_PPI_CHANNEL25
Channel 25.
-
enumerator NRF_PPI_CHANNEL26
Channel 26.
-
enumerator NRF_PPI_CHANNEL27
Channel 27.
-
enumerator NRF_PPI_CHANNEL28
Channel 28.
-
enumerator NRF_PPI_CHANNEL29
Channel 29.
-
enumerator NRF_PPI_CHANNEL30
Channel 30.
-
enumerator NRF_PPI_CHANNEL31
Channel 31.
-
enumerator NRF_PPI_CHANNEL0
-
enum nrf_ppi_channel_group_t
PPI channel groups.
Values:
-
enumerator NRF_PPI_CHANNEL_GROUP0
Channel group 0.
-
enumerator NRF_PPI_CHANNEL_GROUP1
Channel group 1.
-
enumerator NRF_PPI_CHANNEL_GROUP2
Channel group 2.
-
enumerator NRF_PPI_CHANNEL_GROUP3
Channel group 3.
-
enumerator NRF_PPI_CHANNEL_GROUP4
Channel group 4.
-
enumerator NRF_PPI_CHANNEL_GROUP5
Channel group 5.
-
enumerator NRF_PPI_CHANNEL_GROUP0
-
enum nrf_ppi_channel_include_t
Definition of whether a PPI channel belongs to a group.
Values:
-
enumerator NRF_PPI_CHANNEL_EXCLUDE
Channel excluded from a group.
-
enumerator NRF_PPI_CHANNEL_INCLUDE
Channel included in a group.
-
enumerator NRF_PPI_CHANNEL_EXCLUDE
-
enum nrf_ppi_channel_enable_t
Definition of whether a PPI channel is enabled.
Values:
-
enumerator NRF_PPI_CHANNEL_DISABLED
Channel disabled.
-
enumerator NRF_PPI_CHANNEL_ENABLED
Channel enabled.
-
enumerator NRF_PPI_CHANNEL_DISABLED
-
enum nrf_ppi_task_t
PPI tasks.
Values:
-
enumerator NRF_PPI_TASK_CHG0_EN
Task for enabling channel group 0.
-
enumerator NRF_PPI_TASK_CHG0_DIS
Task for disabling channel group 0.
-
enumerator NRF_PPI_TASK_CHG1_EN
Task for enabling channel group 1.
-
enumerator NRF_PPI_TASK_CHG1_DIS
Task for disabling channel group 1.
-
enumerator NRF_PPI_TASK_CHG2_EN
Task for enabling channel group 2.
-
enumerator NRF_PPI_TASK_CHG2_DIS
Task for disabling channel group 2.
-
enumerator NRF_PPI_TASK_CHG3_EN
Task for enabling channel group 3.
-
enumerator NRF_PPI_TASK_CHG3_DIS
Task for disabling channel group 3.
-
enumerator NRF_PPI_TASK_CHG4_EN
Task for enabling channel group 4.
-
enumerator NRF_PPI_TASK_CHG4_DIS
Task for disabling channel group 4.
-
enumerator NRF_PPI_TASK_CHG5_EN
Task for enabling channel group 5.
-
enumerator NRF_PPI_TASK_CHG5_DIS
Task for disabling channel group 5.
-
enumerator NRF_PPI_TASK_CHG0_EN
Functions
-
NRF_STATIC_INLINE void nrf_ppi_channel_enable(NRF_PPI_Type *p_reg, nrf_ppi_channel_t channel)
Function for enabling a given PPI channel.
This function enables only one channel.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
channel – [in] Channel to be enabled.
-
NRF_STATIC_INLINE void nrf_ppi_channel_disable(NRF_PPI_Type *p_reg, nrf_ppi_channel_t channel)
Function for disabling a given PPI channel.
This function disables only one channel.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
channel – [in] Channel to be disabled.
-
NRF_STATIC_INLINE nrf_ppi_channel_enable_t nrf_ppi_channel_enable_get(NRF_PPI_Type const *p_reg, nrf_ppi_channel_t channel)
Function for checking if a given PPI channel is enabled.
This function checks only one channel.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
channel – [in] Channel to be checked.
- Return values
NRF_PPI_CHANNEL_ENABLED – The channel is enabled.
NRF_PPI_CHANNEL_DISABLED – The channel is not enabled.
-
NRF_STATIC_INLINE void nrf_ppi_channels_disable_all(NRF_PPI_Type *p_reg)
Function for disabling all PPI channels.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
-
NRF_STATIC_INLINE void nrf_ppi_channels_enable(NRF_PPI_Type *p_reg, uint32_t mask)
Function for enabling multiple PPI channels.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Channel mask.
-
NRF_STATIC_INLINE void nrf_ppi_channels_disable(NRF_PPI_Type *p_reg, uint32_t mask)
Function for disabling multiple PPI channels.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Channel mask.
-
NRF_STATIC_INLINE void nrf_ppi_channel_endpoint_setup(NRF_PPI_Type *p_reg, 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
p_reg – [in] Pointer to the structure of registers of the peripheral.
eep – [in] Event register address.
tep – [in] Task register address.
channel – [in] Channel to which the given endpoints are assigned.
-
NRF_STATIC_INLINE void nrf_ppi_event_endpoint_setup(NRF_PPI_Type *p_reg, nrf_ppi_channel_t channel, uint32_t eep)
Function for setting up the event endpoint for a given PPI channel.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
eep – [in] Event register address.
channel – [in] Channel to which the given endpoint is assigned.
-
NRF_STATIC_INLINE void nrf_ppi_task_endpoint_setup(NRF_PPI_Type *p_reg, nrf_ppi_channel_t channel, uint32_t tep)
Function for setting up the task endpoint for a given PPI channel.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
tep – [in] Task register address.
channel – [in] Channel to which the given endpoint is assigned.
-
NRF_STATIC_INLINE void nrf_ppi_fork_endpoint_setup(NRF_PPI_Type *p_reg, nrf_ppi_channel_t channel, uint32_t fork_tep)
Function for setting up task endpoint for a given PPI fork.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
fork_tep – [in] Task register address.
channel – [in] Channel to which the given fork endpoint is assigned.
-
NRF_STATIC_INLINE void nrf_ppi_channel_and_fork_endpoint_setup(NRF_PPI_Type *p_reg, 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
p_reg – [in] Pointer to the structure of registers of the peripheral.
eep – [in] Event register address.
tep – [in] Task register address.
fork_tep – [in] Fork task register address (register value).
channel – [in] Channel to which the given endpoints are assigned.
-
NRF_STATIC_INLINE void nrf_ppi_channel_include_in_group(NRF_PPI_Type *p_reg, 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
p_reg – [in] Pointer to the structure of registers of the peripheral.
channel – [in] Channel to be included in the group.
channel_group – [in] Channel group.
-
NRF_STATIC_INLINE void nrf_ppi_channels_include_in_group(NRF_PPI_Type *p_reg, 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
p_reg – [in] Pointer to the structure of registers of the peripheral.
channel_mask – [in] Channels to be included in the group.
channel_group – [in] Channel group.
-
NRF_STATIC_INLINE void nrf_ppi_channel_remove_from_group(NRF_PPI_Type *p_reg, 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
p_reg – [in] Pointer to the structure of registers of the peripheral.
channel – [in] Channel to be removed from the group.
channel_group – [in] Channel group.
-
NRF_STATIC_INLINE void nrf_ppi_channels_remove_from_group(NRF_PPI_Type *p_reg, 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
p_reg – [in] Pointer to the structure of registers of the peripheral.
channel_mask – [in] Channels to be removed from the group.
channel_group – [in] Channel group.
-
NRF_STATIC_INLINE void nrf_ppi_group_clear(NRF_PPI_Type *p_reg, nrf_ppi_channel_group_t group)
Function for removing all PPI channels from a channel group.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
group – [in] Channel group.
-
NRF_STATIC_INLINE void nrf_ppi_group_enable(NRF_PPI_Type *p_reg, nrf_ppi_channel_group_t group)
Function for enabling a channel group.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
group – [in] Channel group.
-
NRF_STATIC_INLINE void nrf_ppi_group_disable(NRF_PPI_Type *p_reg, nrf_ppi_channel_group_t group)
Function for disabling a channel group.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
group – [in] Channel group.
-
NRF_STATIC_INLINE void nrf_ppi_task_trigger(NRF_PPI_Type *p_reg, nrf_ppi_task_t ppi_task)
Function for setting a PPI task.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
ppi_task – [in] PPI task to be set.
-
NRF_STATIC_INLINE uint32_t nrf_ppi_task_address_get(NRF_PPI_Type const *p_reg, nrf_ppi_task_t ppi_task)
Function for getting the address of the specified PPI task register.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
ppi_task – [in] PPI task.
- Returns
Address of the requested PPI task register.
-
NRF_STATIC_INLINE uint32_t nrf_ppi_task_group_enable_address_get(NRF_PPI_Type const *p_reg, nrf_ppi_channel_group_t group)
Function for getting the PPI enable task address of the specified group.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
group – [in] PPI group.
- Returns
PPI enable task address of the specified group.
-
NRF_STATIC_INLINE uint32_t nrf_ppi_task_group_disable_address_get(NRF_PPI_Type const *p_reg, nrf_ppi_channel_group_t group)
Function for getting the PPI disable task address of the specified group.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
group – [in] PPI group.
- Returns
PPI disable task address of the specified group.
-
NRF_STATIC_INLINE nrf_ppi_task_t nrf_ppi_group_enable_task_get(NRF_PPI_Type const *p_reg, uint8_t index)
Function for getting the ENABLE task associated with the specified channel group.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
index – [in] Channel group index.
- Returns
Requested ENABLE task.
-
NRF_STATIC_INLINE nrf_ppi_task_t nrf_ppi_group_disable_task_get(NRF_PPI_Type const *p_reg, uint8_t index)
Function for getting the DISABLE task associated with the specified channel group.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
index – [in] Channel group index.
- Returns
Requested DISABLE task.
-
enum nrf_ppi_channel_t