nRF52 programmable peripheral interconnect channels.
More...
nRF52 programmable peripheral interconnect channels.
A channel connects a peripheral event to a task, and optionally to a second, fork task, so that the task runs on the event without the CPU. Drivers allocate their channels once:
if (ret != 0) {
return ret;
}
void soc_nrf_ppi_setup(uint8_t channel, uintptr_t eep, uintptr_t tep, uintptr_t fork_tep)
Connect the event and tasks of a channel.
void soc_nrf_ppi_enable(uint32_t mask)
Enable channels.
int soc_nrf_ppi_alloc(uint8_t *channel)
Allocate a channel, for good.
#define PBL_BIT(n)
Unsigned 32-bit value with a single bit set.
Definition bits.h:31
The channels the NimBLE radio driver programs directly are never allocated when it is built.
◆ soc_nrf_ppi_alloc()
| int soc_nrf_ppi_alloc |
( |
uint8_t * |
channel | ) |
|
Allocate a channel, for good.
- Parameters
-
| [out] | channel | Allocated channel. |
- Returns
- 0 or
-ENOMEM if all channels are in use.
◆ soc_nrf_ppi_disable()
| void soc_nrf_ppi_disable |
( |
uint32_t |
mask | ) |
|
Disable channels.
- Parameters
-
| mask | Channels, one bit each. |
◆ soc_nrf_ppi_enable()
| void soc_nrf_ppi_enable |
( |
uint32_t |
mask | ) |
|
Enable channels.
- Parameters
-
| mask | Channels, one bit each. |
◆ soc_nrf_ppi_setup()
| void soc_nrf_ppi_setup |
( |
uint8_t |
channel, |
|
|
uintptr_t |
eep, |
|
|
uintptr_t |
tep, |
|
|
uintptr_t |
fork_tep |
|
) |
| |
Connect the event and tasks of a channel.
- Parameters
-
| channel | Channel, from soc_nrf_ppi_alloc(). |
| eep | Event register address. |
| tep | Task register address. |
| fork_tep | Fork task register address, or 0 for none. |