Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | # Kconfig - nrfx I2C support # # Copyright (c) 2018, Nordic Semiconductor ASA # # SPDX-License-Identifier: Apache-2.0 # menuconfig I2C_NRFX bool "nRF TWI nrfx drivers" default y depends on SOC_FAMILY_NRF select HAS_DTS_I2C help Enable support for nrfx TWI drivers for nRF MCU series. Peripherals with the same instance ID cannot be used together, e.g. I2C_0 and SPI_0. You may need to disable SPI_0 or SPI_1. if I2C_NRFX # In most Nordic SoCs the SPI and TWI peripherals with the same instance # number share certain resources and cannot be used at the same time. # In nRF52810 there are only single instances of these peripherals and # they are arranged in a different way so this limitation does not apply. if I2C_0 && (!SPI_0 || SOC_NRF52810) choice I2C_0_NRF_TYPE prompt "I2C Port 0 Driver type" config I2C_0_NRF_TWI bool "nRF TWI 0" depends on HAS_HW_NRF_TWI0 select NRFX_TWI 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 help Enable nRF TWI Master with EasyDMA on port 0. This peripheral accepts transfers from RAM only, if provided buffer is placed in flash, transfer will fail. endchoice endif # I2C_0 && (!SPI_0 || SOC_NRF52810) # Nordic TWIx1 and SPIx1 instances can not be used at the same time. if I2C_1 && !SPI_1 choice I2C_1_NRF_TYPE prompt "I2C Port 1 Driver type" config I2C_1_NRF_TWI bool "nRF TWI 1" depends on HAS_HW_NRF_TWI1 select NRFX_TWI 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 help Enable nRF TWI Master with EasyDMA on port 1. This peripheral accepts transfers from RAM only, if provided buffer is placed in flash, transfer will fail. endchoice endif # I2C_1 && !SPI_1 # Nordic TWIx2 and SPIx2 instances can not be used at the same time. if I2C_2 && !SPI_2 choice I2C_2_NRF_TYPE prompt "I2C Port 2 Driver type" config I2C_2_NRF_TWIM bool "nRF TWIM 2" depends on HAS_HW_NRF_TWIM2 select NRFX_TWIM help Enable nRF TWI Master with EasyDMA on port 2. This peripheral accepts transfers from RAM only, if provided buffer is placed in flash, transfer will fail. endchoice endif # I2C_2 && !SPI_2 # Nordic TWIx3 and SPIx3 instances can not be used at the same time. if I2C_3 && !SPI_3 choice I2C_3_NRF_TYPE prompt "I2C Port 3 Driver type" config I2C_3_NRF_TWIM bool "nRF TWIM 3" depends on HAS_HW_NRF_TWIM3 select NRFX_TWIM help Enable nRF TWI Master with EasyDMA on port 3. This peripheral accepts transfers from RAM only, if provided buffer is placed in flash, transfer will fail. endchoice endif # I2C_3 && !SPI_3 endif #I2C_NRFX |