Skip to content
Permalink
Browse files

ext: nrfx: Reserve PPI channels and groups used by pwm_nrf5_sw driver

Mark the PPI channels used by the pwm_nrf5_sw driver as occupied
and thus unavailable for allocation through nrfx_ppi.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
  • Loading branch information...
anangl authored and carlescufi committed Apr 26, 2019
1 parent e5cf9ce commit bec1fe86a83ce4fc17deed1fe0e26489d094837e
Showing with 11 additions and 3 deletions.
  1. +11 −3 ext/hal/nordic/nrfx_glue.h
@@ -233,13 +233,21 @@ extern "C" {
//------------------------------------------------------------------------------

/** @brief Bitmask that defines DPPI channels that are reserved for use outside of the nrfx library. */
#define NRFX_DPPI_CHANNELS_USED 0
#define NRFX_DPPI_CHANNELS_USED 0

/** @brief Bitmask that defines DPPI groups that are reserved for use outside of the nrfx library. */
#define NRFX_DPPI_GROUPS_USED 0
#define NRFX_DPPI_GROUPS_USED 0

/** @brief Bitmask that defines PPI channels that are reserved for use outside of the nrfx library. */
#define NRFX_PPI_CHANNELS_USED 0
#define NRFX_PPI_CHANNELS_USED NRFX_PPI_CHANNELS_USED_BY_PWM_SW

#if IS_ENABLED(CONFIG_PWM_NRF5_SW)
#define NRFX_PPI_CHANNELS_USED_BY_PWM_SW \
(BIT_MASK(DT_NORDIC_NRF_SW_PWM_0_CHANNEL_COUNT * 2) \
<< DT_NORDIC_NRF_SW_PWM_0_PPI_BASE)
#else
#define NRFX_PPI_CHANNELS_USED_BY_PWM_SW 0
#endif

/** @brief Bitmask that defines PPI groups that are reserved for use outside of the nrfx library. */
#define NRFX_PPI_GROUPS_USED 0

0 comments on commit bec1fe8

Please sign in to comment.
You can’t perform that action at this time.