diff --git a/ext/hal/nordic/CMakeLists.txt b/ext/hal/nordic/CMakeLists.txt index 599b750b267..840bf1a7139 100644 --- a/ext/hal/nordic/CMakeLists.txt +++ b/ext/hal/nordic/CMakeLists.txt @@ -28,7 +28,9 @@ if(CONFIG_HAS_NRFX) zephyr_sources_ifdef(CONFIG_NRFX_ADC nrfx/drivers/src/nrfx_adc.c) zephyr_sources_ifdef(CONFIG_NRFX_CLOCK nrfx/drivers/src/nrfx_clock.c) + zephyr_sources_ifdef(CONFIG_NRFX_GPIOTE nrfx/drivers/src/nrfx_gpiote.c) zephyr_sources_ifdef(CONFIG_NRFX_NFCT nrfx/drivers/src/nrfx_nfct.c) + zephyr_sources_ifdef(CONFIG_NRFX_PPI nrfx/drivers/src/nrfx_ppi.c) zephyr_sources_ifdef(CONFIG_NRFX_PWM nrfx/drivers/src/nrfx_pwm.c) zephyr_sources_ifdef(CONFIG_NRFX_QDEC nrfx/drivers/src/nrfx_qdec.c) zephyr_sources_ifdef(CONFIG_NRFX_RTC nrfx/drivers/src/nrfx_rtc.c) diff --git a/ext/hal/nordic/Kconfig b/ext/hal/nordic/Kconfig index 3f11c514a88..60943ffdea0 100644 --- a/ext/hal/nordic/Kconfig +++ b/ext/hal/nordic/Kconfig @@ -16,10 +16,16 @@ config NRFX_ADC config NRFX_CLOCK bool +config NRFX_GPIOTE + bool + config NRFX_NFCT bool select NRFX_TIMER4 +config NRFX_PPI + bool + config NRFX_PWM bool diff --git a/ext/hal/nordic/nrfx_config_nrf51.h b/ext/hal/nordic/nrfx_config_nrf51.h index a9a2200b75a..32a7e9cb183 100644 --- a/ext/hal/nordic/nrfx_config_nrf51.h +++ b/ext/hal/nordic/nrfx_config_nrf51.h @@ -186,8 +186,8 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== -#ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 0 +#ifdef CONFIG_NRFX_GPIOTE +#define NRFX_GPIOTE_ENABLED 1 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -421,8 +421,8 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== -#ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 0 +#ifdef CONFIG_NRFX_PPI +#define NRFX_PPI_ENABLED 1 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== diff --git a/ext/hal/nordic/nrfx_config_nrf52810.h b/ext/hal/nordic/nrfx_config_nrf52810.h index 6c47c8e09ab..39b751d06d6 100644 --- a/ext/hal/nordic/nrfx_config_nrf52810.h +++ b/ext/hal/nordic/nrfx_config_nrf52810.h @@ -260,8 +260,8 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== -#ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 0 +#ifdef CONFIG_NRFX_GPIOTE +#define NRFX_GPIOTE_ENABLED 1 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -479,8 +479,8 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== -#ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 0 +#ifdef CONFIG_NRFX_PPI +#define NRFX_PPI_ENABLED 1 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== diff --git a/ext/hal/nordic/nrfx_config_nrf52832.h b/ext/hal/nordic/nrfx_config_nrf52832.h index de99ed3a0f7..f19ebb45ff9 100644 --- a/ext/hal/nordic/nrfx_config_nrf52832.h +++ b/ext/hal/nordic/nrfx_config_nrf52832.h @@ -262,8 +262,8 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== -#ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 0 +#ifdef CONFIG_NRFX_GPIOTE +#define NRFX_GPIOTE_ENABLED 1 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -878,8 +878,8 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== -#ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 0 +#ifdef CONFIG_NRFX_PPI +#define NRFX_PPI_ENABLED 1 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== diff --git a/ext/hal/nordic/nrfx_config_nrf52840.h b/ext/hal/nordic/nrfx_config_nrf52840.h index 8d4c00b065f..fbc1903b074 100644 --- a/ext/hal/nordic/nrfx_config_nrf52840.h +++ b/ext/hal/nordic/nrfx_config_nrf52840.h @@ -262,8 +262,8 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== -#ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 0 +#ifdef CONFIG_NRFX_GPIOTE +#define NRFX_GPIOTE_ENABLED 1 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -878,8 +878,8 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== -#ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 0 +#ifdef CONFIG_NRFX_PPI +#define NRFX_PPI_ENABLED 1 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //==========================================================