PebbleOS v4.43.0-108-gde23235b2
Loading...
Searching...
No Matches
PPI
SoC » nRF

nRF52 programmable peripheral interconnect channels. More...

Functions

int soc_nrf_ppi_alloc (uint8_t *channel)
 Allocate a channel, for good.
 
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.
 
void soc_nrf_ppi_disable (uint32_t mask)
 Disable channels.
 

Detailed Description

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:

ret = soc_nrf_ppi_alloc(&ch);
if (ret != 0) {
return ret;
}
soc_nrf_ppi_setup(ch, timer_base + EVENTS_COMPARE0, gpiote_base + TASKS_SET0, 0U);
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.

Function Documentation

◆ soc_nrf_ppi_alloc()

int soc_nrf_ppi_alloc ( uint8_t *  channel)

Allocate a channel, for good.

Parameters
[out]channelAllocated 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
maskChannels, one bit each.

◆ soc_nrf_ppi_enable()

void soc_nrf_ppi_enable ( uint32_t  mask)

Enable channels.

Parameters
maskChannels, 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
channelChannel, from soc_nrf_ppi_alloc().
eepEvent register address.
tepTask register address.
fork_tepFork task register address, or 0 for none.