Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Commit 4e11816

Browse files
rugeGerritsenwopu-ot
authored andcommitted
ppi: Implement nrf_ppi_channel_(enable/disable)
PPI event handling reads NRF_PPI->CHEN. Therefore we must ensure that this variable is updated properly. Signed-off-by: Rubin Gerritsen <[email protected]>
1 parent 71a8a9e commit 4e11816

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/nrfx/hal/nrf_ppi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
#include "NRF_PPI.h"
1010
#include "bs_tracing.h"
1111

12+
void nrf_ppi_channel_enable(NRF_PPI_Type * p_reg, nrf_ppi_channel_t channel)
13+
{
14+
p_reg->CHENSET = (1 << channel);
15+
nrf_ppi_regw_sideeffects_CHENSET();
16+
}
17+
18+
void nrf_ppi_channel_disable(NRF_PPI_Type * p_reg, nrf_ppi_channel_t channel)
19+
{
20+
p_reg->CHENCLR = (1 << channel);
21+
nrf_ppi_regw_sideeffects_CHENCLR();
22+
}
23+
1224
void nrf_ppi_channels_enable(NRF_PPI_Type * p_reg, uint32_t mask)
1325
{
1426
p_reg->CHENSET = mask;

0 commit comments

Comments
 (0)