nRF51 SDK - S210 SoftDevice
|
Hardware abstraction layer for setting up Programmable Peripheral Interconnect (PPI) channels. More...
Macros | |
#define | NRF_PPI_TASK_SET (1UL) |
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_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 } |
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 which PPI channels belong 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 if a PPI channel is enabled. More... | |
enum | nrf_ppi_tasks_t { NRF_PPI_TASKS_CHG0_EN = offsetof(NRF_PPI_Type, TASKS_CHG[0].EN), NRF_PPI_TASKS_CHG0_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[0].DIS), NRF_PPI_TASKS_CHG1_EN = offsetof(NRF_PPI_Type, TASKS_CHG[1].EN), NRF_PPI_TASKS_CHG1_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[1].DIS), NRF_PPI_TASKS_CHG2_EN = offsetof(NRF_PPI_Type, TASKS_CHG[2].EN), NRF_PPI_TASKS_CHG2_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[2].DIS), NRF_PPI_TASKS_CHG3_EN = offsetof(NRF_PPI_Type, TASKS_CHG[3].EN), NRF_PPI_TASKS_CHG3_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[3].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_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_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_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_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_set (nrf_ppi_tasks_t ppi_task) |
Function for setting a PPI task. More... | |
__STATIC_INLINE uint32_t * | nrf_ppi_task_address_get (nrf_ppi_tasks_t ppi_task) |
Function for returning the address of a specific PPI task register. More... | |
Hardware abstraction layer for setting up Programmable Peripheral Interconnect (PPI) channels.
enum nrf_ppi_channel_t |
PPI channels.
enum nrf_ppi_tasks_t |
PPI tasks.
__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.
[in] | channel | Channel to disable. |
__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.
[in] | channel | Channel to enable. |
__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.
[in] | channel | Channel to check. |
NRF_PPI_CHANNEL_ENABLED | If the channel is enabled. |
NRF_PPI_CHANNEL_DISABLED | If the 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.
[in] | eep | Event register address (register value). |
[in] | tep | Task register address (register value). |
[in] | channel | Channel 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.
[in] | group | Channel 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.
[in] | channel | Channel to be included in the group. |
[in] | channel_group | Channel 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.
[in] | channel_group | Channel group. |
[in] | channel | Channel to be removed from the group. |
__STATIC_INLINE void nrf_ppi_group_disable | ( | nrf_ppi_channel_group_t | group | ) |
Function for disabling a channel group.
[in] | group | Channel group. |
__STATIC_INLINE void nrf_ppi_group_enable | ( | nrf_ppi_channel_group_t | group | ) |
Function for enabling a channel group.
[in] | group | Channel group. |
__STATIC_INLINE uint32_t* nrf_ppi_task_address_get | ( | nrf_ppi_tasks_t | ppi_task | ) |
Function for returning the address of a specific PPI task register.
[in] | ppi_task | PPI task. |
__STATIC_INLINE void nrf_ppi_task_set | ( | nrf_ppi_tasks_t | ppi_task | ) |
Function for setting a PPI task.
[in] | ppi_task | PPI task to set. |