Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: fixes for config #259

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions drivers/nrf_802154/driver/src/nrf_802154_peripherals_nrf52.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <nrfx.h>
#include "nrf_802154_config.h"
#include "nrf_802154_debug.h"
#include "hal/nrf_ppi.h"
#include "nrf_802154_sl_periphs.h"

#ifdef __cplusplus
Expand Down Expand Up @@ -113,7 +112,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_RADIO_RAMP_UP_TRIGG
#define NRF_802154_PPI_RADIO_RAMP_UP_TRIGG NRF_PPI_CHANNEL6
#define NRF_802154_PPI_RADIO_RAMP_UP_TRIGG 6
#endif

/**
Expand All @@ -126,7 +125,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_RADIO_DISABLED_TO_EGU
#define NRF_802154_PPI_RADIO_DISABLED_TO_EGU NRF_PPI_CHANNEL6
#define NRF_802154_PPI_RADIO_DISABLED_TO_EGU 6
#endif

/**
Expand All @@ -138,7 +137,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_EGU_TO_RADIO_RAMP_UP
#define NRF_802154_PPI_EGU_TO_RADIO_RAMP_UP NRF_PPI_CHANNEL7
#define NRF_802154_PPI_EGU_TO_RADIO_RAMP_UP 7
#endif

/**
Expand All @@ -150,7 +149,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_EGU_TO_TIMER_START
#define NRF_802154_PPI_EGU_TO_TIMER_START NRF_PPI_CHANNEL8
#define NRF_802154_PPI_EGU_TO_TIMER_START 8
#endif

/**
Expand All @@ -164,7 +163,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_RADIO_CRCERROR_TO_TIMER_CLEAR
#define NRF_802154_PPI_RADIO_CRCERROR_TO_TIMER_CLEAR NRF_PPI_CHANNEL9
#define NRF_802154_PPI_RADIO_CRCERROR_TO_TIMER_CLEAR 9
#endif

/**
Expand All @@ -178,7 +177,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_RADIO_CCAIDLE_TO_FEM_GPIOTE
#define NRF_802154_PPI_RADIO_CCAIDLE_TO_FEM_GPIOTE NRF_PPI_CHANNEL9
#define NRF_802154_PPI_RADIO_CCAIDLE_TO_FEM_GPIOTE 9
#endif

/**
Expand All @@ -192,7 +191,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_TIMER_COMPARE_TO_RADIO_TXEN
#define NRF_802154_PPI_TIMER_COMPARE_TO_RADIO_TXEN NRF_PPI_CHANNEL9
#define NRF_802154_PPI_TIMER_COMPARE_TO_RADIO_TXEN 9
#endif

/**
Expand All @@ -205,7 +204,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_RADIO_CCABUSY_TO_RADIO_CCASTART
#define NRF_802154_PPI_RADIO_CCABUSY_TO_RADIO_CCASTART NRF_PPI_CHANNEL10
#define NRF_802154_PPI_RADIO_CCABUSY_TO_RADIO_CCASTART 10
#endif

/**
Expand All @@ -216,7 +215,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_RADIO_SYNC_TO_EGU_SYNC
#define NRF_802154_PPI_RADIO_SYNC_TO_EGU_SYNC NRF_PPI_CHANNEL11
#define NRF_802154_PPI_RADIO_SYNC_TO_EGU_SYNC 11
#endif

#define NRF_802154_DISABLE_BCC_MATCHING_PPI_CHANNELS_USED_MASK \
Expand All @@ -231,7 +230,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_CORE_GROUP
#define NRF_802154_PPI_CORE_GROUP NRF_PPI_CHANNEL_GROUP0
#define NRF_802154_PPI_CORE_GROUP 0
#endif

/**
Expand All @@ -241,7 +240,7 @@ extern "C" {
*
*/
#ifndef NRF_802154_PPI_ABORT_GROUP
#define NRF_802154_PPI_ABORT_GROUP NRF_PPI_CHANNEL_GROUP1
#define NRF_802154_PPI_ABORT_GROUP 1
#endif

/**
Expand Down
132 changes: 68 additions & 64 deletions nrfx/templates/nrfx_config_nrf5340_application.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,70 +46,71 @@
* The following section provides configuration for the name translation.
* It must be modified to reflect the actual configuration set in NRF_SPU.
*/
#define NRF_CLOCK NRF_CLOCK_S
#define NRF_COMP NRF_COMP_S
#define NRF_DCNF NRF_DCNF_S
#define NRF_DPPIC NRF_DPPIC_S
#define NRF_EGU0 NRF_EGU0_S
#define NRF_EGU1 NRF_EGU1_S
#define NRF_EGU2 NRF_EGU2_S
#define NRF_EGU3 NRF_EGU3_S
#define NRF_EGU4 NRF_EGU4_S
#define NRF_EGU5 NRF_EGU5_S
#define NRF_FPU NRF_FPU_S
#define NRF_I2S0 NRF_I2S0_S
#define NRF_IPC NRF_IPC_S
#define NRF_KMU NRF_KMU_S
#define NRF_LPCOMP NRF_LPCOMP_S
#define NRF_MUTEX NRF_MUTEX_S
#define NRF_NFCT NRF_NFCT_S
#define NRF_NVMC NRF_NVMC_S
#define NRF_OSCILLATORS NRF_OSCILLATORS_S
#define NRF_P0 NRF_P0_S
#define NRF_P1 NRF_P1_S
#define NRF_PDM0 NRF_PDM0_S
#define NRF_POWER NRF_POWER_S
#define NRF_PWM0 NRF_PWM0_S
#define NRF_PWM1 NRF_PWM1_S
#define NRF_PWM2 NRF_PWM2_S
#define NRF_PWM3 NRF_PWM3_S
#define NRF_QDEC0 NRF_QDEC0_S
#define NRF_QDEC1 NRF_QDEC1_S
#define NRF_QSPI NRF_QSPI_S
#define NRF_REGULATORS NRF_REGULATORS_S
#define NRF_RESET NRF_RESET_S
#define NRF_RTC0 NRF_RTC0_S
#define NRF_RTC1 NRF_RTC1_S
#define NRF_SAADC NRF_SAADC_S
#define NRF_SPIM0 NRF_SPIM0_S
#define NRF_SPIM1 NRF_SPIM1_S
#define NRF_SPIM2 NRF_SPIM2_S
#define NRF_SPIM3 NRF_SPIM3_S
#define NRF_SPIM4 NRF_SPIM4_S
#define NRF_SPIS0 NRF_SPIS0_S
#define NRF_SPIS1 NRF_SPIS1_S
#define NRF_SPIS2 NRF_SPIS2_S
#define NRF_SPIS3 NRF_SPIS3_S
#define NRF_TIMER0 NRF_TIMER0_S
#define NRF_TIMER1 NRF_TIMER1_S
#define NRF_TIMER2 NRF_TIMER2_S
#define NRF_TWIM0 NRF_TWIM0_S
#define NRF_TWIM1 NRF_TWIM1_S
#define NRF_TWIM2 NRF_TWIM2_S
#define NRF_TWIM3 NRF_TWIM3_S
#define NRF_TWIS0 NRF_TWIS0_S
#define NRF_TWIS1 NRF_TWIS1_S
#define NRF_TWIS2 NRF_TWIS2_S
#define NRF_TWIS3 NRF_TWIS3_S
#define NRF_UARTE0 NRF_UARTE0_S
#define NRF_UARTE1 NRF_UARTE1_S
#define NRF_UARTE2 NRF_UARTE2_S
#define NRF_UARTE3 NRF_UARTE3_S
#define NRF_USBD NRF_USBD_S
#define NRF_USBREGULATOR NRF_USBREGULATOR_S
#define NRF_VMC NRF_VMC_S
#define NRF_WDT0 NRF_WDT0_S
#define NRF_WDT1 NRF_WDT1_S
#define NRF_CLOCK NRF_PERIPH(NRF_CLOCK)
#define NRF_COMP NRF_PERIPH(NRF_COMP)
#define NRF_CTRLAP NRF_PERIPH(NRF_CTRLAP)
#define NRF_DCNF NRF_PERIPH(NRF_DCNF)
#define NRF_DPPIC NRF_PERIPH(NRF_DPPIC)
#define NRF_EGU0 NRF_PERIPH(NRF_EGU0)
#define NRF_EGU1 NRF_PERIPH(NRF_EGU1)
#define NRF_EGU2 NRF_PERIPH(NRF_EGU2)
#define NRF_EGU3 NRF_PERIPH(NRF_EGU3)
#define NRF_EGU4 NRF_PERIPH(NRF_EGU4)
#define NRF_EGU5 NRF_PERIPH(NRF_EGU5)
#define NRF_FPU NRF_PERIPH(NRF_FPU)
#define NRF_I2S0 NRF_PERIPH(NRF_I2S0)
#define NRF_IPC NRF_PERIPH(NRF_IPC)
#define NRF_KMU NRF_PERIPH(NRF_KMU)
#define NRF_LPCOMP NRF_PERIPH(NRF_LPCOMP)
#define NRF_MUTEX NRF_PERIPH(NRF_MUTEX)
#define NRF_NFCT NRF_PERIPH(NRF_NFCT)
#define NRF_NVMC NRF_PERIPH(NRF_NVMC)
#define NRF_OSCILLATORS NRF_PERIPH(NRF_OSCILLATORS)
#define NRF_P0 NRF_PERIPH(NRF_P0)
#define NRF_P1 NRF_PERIPH(NRF_P1)
#define NRF_PDM0 NRF_PERIPH(NRF_PDM0)
#define NRF_POWER NRF_PERIPH(NRF_POWER)
#define NRF_PWM0 NRF_PERIPH(NRF_PWM0)
#define NRF_PWM1 NRF_PERIPH(NRF_PWM1)
#define NRF_PWM2 NRF_PERIPH(NRF_PWM2)
#define NRF_PWM3 NRF_PERIPH(NRF_PWM3)
#define NRF_QDEC0 NRF_PERIPH(NRF_QDEC0)
#define NRF_QDEC1 NRF_PERIPH(NRF_QDEC1)
#define NRF_QSPI NRF_PERIPH(NRF_QSPI)
#define NRF_REGULATORS NRF_PERIPH(NRF_REGULATORS)
#define NRF_RESET NRF_PERIPH(NRF_RESET)
#define NRF_RTC0 NRF_PERIPH(NRF_RTC0)
#define NRF_RTC1 NRF_PERIPH(NRF_RTC1)
#define NRF_SAADC NRF_PERIPH(NRF_SAADC)
#define NRF_SPIM0 NRF_PERIPH(NRF_SPIM0)
#define NRF_SPIM1 NRF_PERIPH(NRF_SPIM1)
#define NRF_SPIM2 NRF_PERIPH(NRF_SPIM2)
#define NRF_SPIM3 NRF_PERIPH(NRF_SPIM3)
#define NRF_SPIM4 NRF_PERIPH(NRF_SPIM4)
#define NRF_SPIS0 NRF_PERIPH(NRF_SPIS0)
#define NRF_SPIS1 NRF_PERIPH(NRF_SPIS1)
#define NRF_SPIS2 NRF_PERIPH(NRF_SPIS2)
#define NRF_SPIS3 NRF_PERIPH(NRF_SPIS3)
#define NRF_TIMER0 NRF_PERIPH(NRF_TIMER0)
#define NRF_TIMER1 NRF_PERIPH(NRF_TIMER1)
#define NRF_TIMER2 NRF_PERIPH(NRF_TIMER2)
#define NRF_TWIM0 NRF_PERIPH(NRF_TWIM0)
#define NRF_TWIM1 NRF_PERIPH(NRF_TWIM1)
#define NRF_TWIM2 NRF_PERIPH(NRF_TWIM2)
#define NRF_TWIM3 NRF_PERIPH(NRF_TWIM3)
#define NRF_TWIS0 NRF_PERIPH(NRF_TWIS0)
#define NRF_TWIS1 NRF_PERIPH(NRF_TWIS1)
#define NRF_TWIS2 NRF_PERIPH(NRF_TWIS2)
#define NRF_TWIS3 NRF_PERIPH(NRF_TWIS3)
#define NRF_UARTE0 NRF_PERIPH(NRF_UARTE0)
#define NRF_UARTE1 NRF_PERIPH(NRF_UARTE1)
#define NRF_UARTE2 NRF_PERIPH(NRF_UARTE2)
#define NRF_UARTE3 NRF_PERIPH(NRF_UARTE3)
#define NRF_USBD NRF_PERIPH(NRF_USBD)
#define NRF_USBREGULATOR NRF_PERIPH(NRF_USBREGULATOR)
#define NRF_VMC NRF_PERIPH(NRF_VMC)
#define NRF_WDT0 NRF_PERIPH(NRF_WDT0)
#define NRF_WDT1 NRF_PERIPH(NRF_WDT1)

/*
* The following section provides the name translation for peripherals with
Expand All @@ -126,6 +127,9 @@
#define NRF_SPU NRF_SPU_S
#define NRF_TAD NRF_TAD_S
#define NRF_UICR NRF_UICR_S
#define NRF_GPIOTE NRF_GPIOTE0
#else
#define NRF_GPIOTE NRF_GPIOTE1
#endif

/* Fixups for the GPIOTE driver. */
Expand Down
101 changes: 52 additions & 49 deletions nrfx/templates/nrfx_config_nrf91.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,55 +46,55 @@
* The following section provides configuration for the name translation.
* It must be modified to reflect the actual configuration set in NRF_SPU.
*/
#define NRF_CLOCK NRF_CLOCK_S
#define NRF_DPPIC NRF_DPPIC_S
#define NRF_EGU0 NRF_EGU0_S
#define NRF_EGU1 NRF_EGU1_S
#define NRF_EGU2 NRF_EGU2_S
#define NRF_EGU3 NRF_EGU3_S
#define NRF_EGU4 NRF_EGU4_S
#define NRF_EGU5 NRF_EGU5_S
#define NRF_FPU NRF_FPU_S
#define NRF_I2S NRF_I2S_S
#define NRF_IPC NRF_IPC_S
#define NRF_KMU NRF_KMU_S
#define NRF_NVMC NRF_NVMC_S
#define NRF_P0 NRF_P0_S
#define NRF_PDM NRF_PDM_S
#define NRF_POWER NRF_POWER_S
#define NRF_PWM0 NRF_PWM0_S
#define NRF_PWM1 NRF_PWM1_S
#define NRF_PWM2 NRF_PWM2_S
#define NRF_PWM3 NRF_PWM3_S
#define NRF_REGULATORS NRF_REGULATORS_S
#define NRF_RTC0 NRF_RTC0_S
#define NRF_RTC1 NRF_RTC1_S
#define NRF_SAADC NRF_SAADC_S
#define NRF_SPIM0 NRF_SPIM0_S
#define NRF_SPIM1 NRF_SPIM1_S
#define NRF_SPIM2 NRF_SPIM2_S
#define NRF_SPIM3 NRF_SPIM3_S
#define NRF_SPIS0 NRF_SPIS0_S
#define NRF_SPIS1 NRF_SPIS1_S
#define NRF_SPIS2 NRF_SPIS2_S
#define NRF_SPIS3 NRF_SPIS3_S
#define NRF_TIMER0 NRF_TIMER0_S
#define NRF_TIMER1 NRF_TIMER1_S
#define NRF_TIMER2 NRF_TIMER2_S
#define NRF_TWIM0 NRF_TWIM0_S
#define NRF_TWIM1 NRF_TWIM1_S
#define NRF_TWIM2 NRF_TWIM2_S
#define NRF_TWIM3 NRF_TWIM3_S
#define NRF_TWIS0 NRF_TWIS0_S
#define NRF_TWIS1 NRF_TWIS1_S
#define NRF_TWIS2 NRF_TWIS2_S
#define NRF_TWIS3 NRF_TWIS3_S
#define NRF_UARTE0 NRF_UARTE0_S
#define NRF_UARTE1 NRF_UARTE1_S
#define NRF_UARTE2 NRF_UARTE2_S
#define NRF_UARTE3 NRF_UARTE3_S
#define NRF_VMC NRF_VMC_S
#define NRF_WDT NRF_WDT_S
#define NRF_CLOCK NRF_PERIPH(NRF_CLOCK)
#define NRF_DPPIC NRF_PERIPH(NRF_DPPIC)
#define NRF_EGU0 NRF_PERIPH(NRF_EGU0)
#define NRF_EGU1 NRF_PERIPH(NRF_EGU1)
#define NRF_EGU2 NRF_PERIPH(NRF_EGU2)
#define NRF_EGU3 NRF_PERIPH(NRF_EGU3)
#define NRF_EGU4 NRF_PERIPH(NRF_EGU4)
#define NRF_EGU5 NRF_PERIPH(NRF_EGU5)
#define NRF_FPU NRF_PERIPH(NRF_FPU)
#define NRF_I2S NRF_PERIPH(NRF_I2S)
#define NRF_IPC NRF_PERIPH(NRF_IPC)
#define NRF_KMU NRF_PERIPH(NRF_KMU)
#define NRF_NVMC NRF_PERIPH(NRF_NVMC)
#define NRF_P0 NRF_PERIPH(NRF_P0)
#define NRF_PDM NRF_PERIPH(NRF_PDM)
#define NRF_POWER NRF_PERIPH(NRF_POWER)
#define NRF_PWM0 NRF_PERIPH(NRF_PWM0)
#define NRF_PWM1 NRF_PERIPH(NRF_PWM1)
#define NRF_PWM2 NRF_PERIPH(NRF_PWM2)
#define NRF_PWM3 NRF_PERIPH(NRF_PWM3)
#define NRF_REGULATORS NRF_PERIPH(NRF_REGULATORS)
#define NRF_RTC0 NRF_PERIPH(NRF_RTC0)
#define NRF_RTC1 NRF_PERIPH(NRF_RTC1)
#define NRF_SAADC NRF_PERIPH(NRF_SAADC)
#define NRF_SPIM0 NRF_PERIPH(NRF_SPIM0)
#define NRF_SPIM1 NRF_PERIPH(NRF_SPIM1)
#define NRF_SPIM2 NRF_PERIPH(NRF_SPIM2)
#define NRF_SPIM3 NRF_PERIPH(NRF_SPIM3)
#define NRF_SPIS0 NRF_PERIPH(NRF_SPIS0)
#define NRF_SPIS1 NRF_PERIPH(NRF_SPIS1)
#define NRF_SPIS2 NRF_PERIPH(NRF_SPIS2)
#define NRF_SPIS3 NRF_PERIPH(NRF_SPIS3)
#define NRF_TIMER0 NRF_PERIPH(NRF_TIMER0)
#define NRF_TIMER1 NRF_PERIPH(NRF_TIMER1)
#define NRF_TIMER2 NRF_PERIPH(NRF_TIMER2)
#define NRF_TWIM0 NRF_PERIPH(NRF_TWIM0)
#define NRF_TWIM1 NRF_PERIPH(NRF_TWIM1)
#define NRF_TWIM2 NRF_PERIPH(NRF_TWIM2)
#define NRF_TWIM3 NRF_PERIPH(NRF_TWIM3)
#define NRF_TWIS0 NRF_PERIPH(NRF_TWIS0)
#define NRF_TWIS1 NRF_PERIPH(NRF_TWIS1)
#define NRF_TWIS2 NRF_PERIPH(NRF_TWIS2)
#define NRF_TWIS3 NRF_PERIPH(NRF_TWIS3)
#define NRF_UARTE0 NRF_PERIPH(NRF_UARTE0)
#define NRF_UARTE1 NRF_PERIPH(NRF_UARTE1)
#define NRF_UARTE2 NRF_PERIPH(NRF_UARTE2)
#define NRF_UARTE3 NRF_PERIPH(NRF_UARTE3)
#define NRF_VMC NRF_PERIPH(NRF_VMC)
#define NRF_WDT NRF_PERIPH(NRF_WDT)

/*
* The following section provides the name translation for peripherals with
Expand All @@ -109,6 +109,9 @@
#define NRF_SPU NRF_SPU_S
#define NRF_TAD NRF_TAD_S
#define NRF_UICR NRF_UICR_S
#define NRF_GPIOTE NRF_GPIOTE0
#else
#define NRF_GPIOTE NRF_GPIOTE1
#endif

/* Fixups for the GPIOTE driver. */
Expand Down