modules: Kconfig: Unify the way of enabling instances in nrfx drivers
Use a consistent way of enabling particular instances of peripherals in nrfx drivers through options defined in modules/Kconfig.nordic, to make the usage of nrfx drivers in Zephyr, especially the ones for which there are no Zephyr driver shims (yet), easier. Jira: NCSDK-2744 Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
7bcaf3696d
commit
70d426bd33
4 changed files with 135 additions and 24 deletions
|
@ -31,14 +31,14 @@ choice I2C_0_NRF_TYPE
|
|||
config I2C_0_NRF_TWI
|
||||
bool "nRF TWI 0"
|
||||
depends on HAS_HW_NRF_TWI0
|
||||
select NRFX_TWI
|
||||
select NRFX_TWI0
|
||||
help
|
||||
Enable nRF TWI Master without EasyDMA on port 0.
|
||||
|
||||
config I2C_0_NRF_TWIM
|
||||
bool "nRF TWIM 0"
|
||||
depends on HAS_HW_NRF_TWIM0
|
||||
select NRFX_TWIM
|
||||
select NRFX_TWIM0
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 0.
|
||||
This peripheral accepts transfers from RAM only,
|
||||
|
@ -59,14 +59,14 @@ choice I2C_1_NRF_TYPE
|
|||
config I2C_1_NRF_TWI
|
||||
bool "nRF TWI 1"
|
||||
depends on HAS_HW_NRF_TWI1
|
||||
select NRFX_TWI
|
||||
select NRFX_TWI1
|
||||
help
|
||||
Enable nRF TWI Master without EasyDMA on port 1.
|
||||
|
||||
config I2C_1_NRF_TWIM
|
||||
bool "nRF TWIM 1"
|
||||
depends on HAS_HW_NRF_TWIM1
|
||||
select NRFX_TWIM
|
||||
select NRFX_TWIM1
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 1.
|
||||
This peripheral accepts transfers from RAM only,
|
||||
|
@ -87,7 +87,7 @@ choice I2C_2_NRF_TYPE
|
|||
config I2C_2_NRF_TWIM
|
||||
bool "nRF TWIM 2"
|
||||
depends on HAS_HW_NRF_TWIM2
|
||||
select NRFX_TWIM
|
||||
select NRFX_TWIM2
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 2.
|
||||
This peripheral accepts transfers from RAM only,
|
||||
|
@ -108,7 +108,7 @@ choice I2C_3_NRF_TYPE
|
|||
config I2C_3_NRF_TWIM
|
||||
bool "nRF TWIM 3"
|
||||
depends on HAS_HW_NRF_TWIM3
|
||||
select NRFX_TWIM
|
||||
select NRFX_TWIM3
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 3.
|
||||
This peripheral accepts transfers from RAM only,
|
||||
|
|
|
@ -8,6 +8,9 @@ menuconfig PWM_NRFX
|
|||
default y
|
||||
depends on HAS_HW_NRF_PWM0 || HAS_HW_NRF_PWM1 || \
|
||||
HAS_HW_NRF_PWM2 || HAS_HW_NRF_PWM3
|
||||
select NRFX_PWM
|
||||
select NRFX_PWM0 if PWM_0
|
||||
select NRFX_PWM1 if PWM_1
|
||||
select NRFX_PWM2 if PWM_2
|
||||
select NRFX_PWM3 if PWM_3
|
||||
help
|
||||
Enable support for nrfx Hardware PWM driver for nRF52 MCU series.
|
||||
|
|
|
@ -41,7 +41,7 @@ choice
|
|||
config SPI_0_NRF_SPI
|
||||
bool "nRF SPI 0"
|
||||
depends on HAS_HW_NRF_SPI0
|
||||
select NRFX_SPI
|
||||
select NRFX_SPI0
|
||||
help
|
||||
Enable nRF SPI Master without EasyDMA on port 0.
|
||||
|
||||
|
@ -51,7 +51,7 @@ config SPI_0_NRF_SPIM
|
|||
# (SPIM: An additional byte is clocked out when RXD.MAXCNT == 1 and TXD.MAXCNT <= 1)
|
||||
# Allow the 'EasyDMA' driver only if this automatic safety-disable is overridden
|
||||
depends on HAS_HW_NRF_SPIM0 && (!SOC_NRF52832 || SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58)
|
||||
select NRFX_SPIM
|
||||
select NRFX_SPIM0
|
||||
help
|
||||
Enable nRF SPI Master with EasyDMA on port 0.
|
||||
|
||||
|
@ -59,7 +59,7 @@ config SPI_0_NRF_SPIS
|
|||
bool "nRF SPIS 0"
|
||||
depends on HAS_HW_NRF_SPIS0
|
||||
depends on SPI_SLAVE
|
||||
select NRFX_SPIS
|
||||
select NRFX_SPIS0
|
||||
help
|
||||
Enable nRF SPI Slave with EasyDMA on port 0.
|
||||
Due to hardware limitations the implementation supports only simple
|
||||
|
@ -92,7 +92,7 @@ choice
|
|||
config SPI_1_NRF_SPI
|
||||
bool "nRF SPI 1"
|
||||
depends on HAS_HW_NRF_SPI1
|
||||
select NRFX_SPI
|
||||
select NRFX_SPI1
|
||||
help
|
||||
Enable nRF SPI Master without EasyDMA on port 1.
|
||||
|
||||
|
@ -102,7 +102,7 @@ config SPI_1_NRF_SPIM
|
|||
# (SPIM: An additional byte is clocked out when RXD.MAXCNT == 1 and TXD.MAXCNT <= 1)
|
||||
# Allow the 'EasyDMA' driver only if this automatic safety-disable is overridden
|
||||
depends on HAS_HW_NRF_SPIM1 && (!SOC_NRF52832 || SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58)
|
||||
select NRFX_SPIM
|
||||
select NRFX_SPIM1
|
||||
help
|
||||
Enable nRF SPI Master with EasyDMA on port 1.
|
||||
|
||||
|
@ -110,7 +110,7 @@ config SPI_1_NRF_SPIS
|
|||
bool "nRF SPIS 1"
|
||||
depends on HAS_HW_NRF_SPIS1
|
||||
depends on SPI_SLAVE
|
||||
select NRFX_SPIS
|
||||
select NRFX_SPIS1
|
||||
help
|
||||
Enable nRF SPI Slave with EasyDMA on port 1.
|
||||
Due to hardware limitations the implementation supports only simple
|
||||
|
@ -143,7 +143,7 @@ choice
|
|||
config SPI_2_NRF_SPI
|
||||
bool "nRF SPI 2"
|
||||
depends on HAS_HW_NRF_SPI2
|
||||
select NRFX_SPI
|
||||
select NRFX_SPI2
|
||||
help
|
||||
Enable nRF SPI Master without EasyDMA on port 2.
|
||||
|
||||
|
@ -153,7 +153,7 @@ config SPI_2_NRF_SPIM
|
|||
# (SPIM: An additional byte is clocked out when RXD.MAXCNT == 1 and TXD.MAXCNT <= 1)
|
||||
# Allow the 'EasyDMA' driver only if this automatic safety-disable is overridden
|
||||
depends on HAS_HW_NRF_SPIM2 && (!SOC_NRF52832 || SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58)
|
||||
select NRFX_SPIM
|
||||
select NRFX_SPIM2
|
||||
help
|
||||
Enable nRF SPI Master with EasyDMA on port 2.
|
||||
|
||||
|
@ -161,7 +161,7 @@ config SPI_2_NRF_SPIS
|
|||
bool "nRF SPIS 2"
|
||||
depends on HAS_HW_NRF_SPIS2
|
||||
depends on SPI_SLAVE
|
||||
select NRFX_SPIS
|
||||
select NRFX_SPIS2
|
||||
help
|
||||
Enable nRF SPI Slave with EasyDMA on port 2.
|
||||
Due to hardware limitations the implementation supports only simple
|
||||
|
@ -194,7 +194,7 @@ choice
|
|||
config SPI_3_NRF_SPIM
|
||||
bool "nRF SPIM 3"
|
||||
depends on HAS_HW_NRF_SPIM3
|
||||
select NRFX_SPIM
|
||||
select NRFX_SPIM3
|
||||
help
|
||||
Enable nRF SPI Master with EasyDMA on port 3.
|
||||
|
||||
|
@ -202,7 +202,7 @@ config SPI_3_NRF_SPIS
|
|||
bool "nRF SPIS 3"
|
||||
depends on HAS_HW_NRF_SPIS3
|
||||
depends on SPI_SLAVE
|
||||
select NRFX_SPIS
|
||||
select NRFX_SPIS3
|
||||
help
|
||||
Enable nRF SPI Slave with EasyDMA on port 3.
|
||||
Due to hardware limitations the implementation supports only simple
|
||||
|
|
|
@ -10,6 +10,26 @@ config HAS_NRFX
|
|||
config NRFX_PRS
|
||||
bool
|
||||
|
||||
config NRFX_PRS_BOX_0
|
||||
bool
|
||||
select NRFX_PRS
|
||||
|
||||
config NRFX_PRS_BOX_1
|
||||
bool
|
||||
select NRFX_PRS
|
||||
|
||||
config NRFX_PRS_BOX_2
|
||||
bool
|
||||
select NRFX_PRS
|
||||
|
||||
config NRFX_PRS_BOX_3
|
||||
bool
|
||||
select NRFX_PRS
|
||||
|
||||
config NRFX_PRS_BOX_4
|
||||
bool
|
||||
select NRFX_PRS
|
||||
|
||||
config NRFX_ADC
|
||||
bool
|
||||
|
||||
|
@ -35,36 +55,96 @@ config NRFX_PPI
|
|||
config NRFX_PWM
|
||||
bool
|
||||
|
||||
config NRFX_PWM0
|
||||
bool
|
||||
select NRFX_PWM
|
||||
|
||||
config NRFX_PWM1
|
||||
bool
|
||||
select NRFX_PWM
|
||||
|
||||
config NRFX_PWM2
|
||||
bool
|
||||
select NRFX_PWM
|
||||
|
||||
config NRFX_PWM3
|
||||
bool
|
||||
select NRFX_PWM
|
||||
|
||||
config NRFX_QDEC
|
||||
bool
|
||||
|
||||
config NRFX_RTC
|
||||
bool
|
||||
|
||||
config NRFX_SAADC
|
||||
bool
|
||||
|
||||
config NRFX_RTC
|
||||
bool
|
||||
|
||||
config NRFX_RTC0
|
||||
bool
|
||||
select NRFX_RTC
|
||||
|
||||
config NRFX_RTC1
|
||||
bool
|
||||
select NRFX_RTC
|
||||
|
||||
config NRFX_RTC2
|
||||
bool
|
||||
select NRFX_RTC
|
||||
|
||||
config NRFX_SAADC
|
||||
bool
|
||||
|
||||
config NRFX_SPI
|
||||
bool
|
||||
|
||||
config NRFX_SPI0
|
||||
bool
|
||||
select NRFX_SPI
|
||||
|
||||
config NRFX_SPI1
|
||||
bool
|
||||
select NRFX_SPI
|
||||
|
||||
config NRFX_SPI2
|
||||
bool
|
||||
select NRFX_SPI
|
||||
|
||||
config NRFX_SPIM
|
||||
bool
|
||||
|
||||
config NRFX_SPIM0
|
||||
bool
|
||||
select NRFX_SPIM
|
||||
|
||||
config NRFX_SPIM1
|
||||
bool
|
||||
select NRFX_SPIM
|
||||
|
||||
config NRFX_SPIM2
|
||||
bool
|
||||
select NRFX_SPIM
|
||||
|
||||
config NRFX_SPIM3
|
||||
bool
|
||||
select NRFX_SPIM
|
||||
|
||||
config NRFX_SPIS
|
||||
bool
|
||||
|
||||
config NRFX_SPIS0
|
||||
bool
|
||||
select NRFX_SPIS
|
||||
|
||||
config NRFX_SPIS1
|
||||
bool
|
||||
select NRFX_SPIS
|
||||
|
||||
config NRFX_SPIS2
|
||||
bool
|
||||
select NRFX_SPIS
|
||||
|
||||
config NRFX_SPIS3
|
||||
bool
|
||||
select NRFX_SPIS
|
||||
|
||||
config NRFX_SYSTICK
|
||||
bool
|
||||
|
||||
|
@ -94,12 +174,40 @@ config NRFX_TIMER4
|
|||
config NRFX_TWI
|
||||
bool
|
||||
|
||||
config NRFX_TWI0
|
||||
bool
|
||||
select NRFX_TWI
|
||||
|
||||
config NRFX_TWI1
|
||||
bool
|
||||
select NRFX_TWI
|
||||
|
||||
config NRFX_TWIM
|
||||
bool
|
||||
|
||||
config NRFX_TWIM0
|
||||
bool
|
||||
select NRFX_TWIM
|
||||
|
||||
config NRFX_TWIM1
|
||||
bool
|
||||
select NRFX_TWIM
|
||||
|
||||
config NRFX_TWIM2
|
||||
bool
|
||||
select NRFX_TWIM
|
||||
|
||||
config NRFX_TWIM3
|
||||
bool
|
||||
select NRFX_TWIM
|
||||
|
||||
config NRFX_UART
|
||||
bool
|
||||
|
||||
config NRFX_UART0
|
||||
bool
|
||||
select NRFX_UART
|
||||
|
||||
config NRFX_UARTE
|
||||
bool
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue