Linux Audio

Check our new training course

Embedded Linux Audio

Check our new training course
with Creative Commons CC-BY-SA
lecture materials

Bootlin logo

Elixir Cross Referencer

Loading...
# 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
	help
	  Enable support for nrfx TWI drivers for nRF MCU series.

if I2C_NRFX

# Workaround for not being able to have commas in macro arguments
DT_COMPAT_NORDIC_NRF_TWI  := nordic,nrf-twi
DT_COMPAT_NORDIC_NRF_TWIM := nordic,nrf-twim

config I2C_0_NRF_TWI
	def_bool $(dt_nodelabel_has_compat,i2c0,$(DT_COMPAT_NORDIC_NRF_TWI))
	select NRFX_TWI0
	help
	  Enable nRF TWI Master without EasyDMA on port 0.

config I2C_0_NRF_TWIM
	def_bool $(dt_nodelabel_has_compat,i2c0,$(DT_COMPAT_NORDIC_NRF_TWIM))
	select NRFX_TWIM0
	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.

config I2C_1_NRF_TWI
	def_bool $(dt_nodelabel_has_compat,i2c1,$(DT_COMPAT_NORDIC_NRF_TWI))
	select NRFX_TWI1
	help
	  Enable nRF TWI Master without EasyDMA on port 1.

config I2C_1_NRF_TWIM
	def_bool $(dt_nodelabel_has_compat,i2c1,$(DT_COMPAT_NORDIC_NRF_TWIM))
	select NRFX_TWIM1
	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.

config I2C_2_NRF_TWIM
	def_bool $(dt_nodelabel_has_compat,i2c2,$(DT_COMPAT_NORDIC_NRF_TWIM))
	select NRFX_TWIM2
	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.

config I2C_3_NRF_TWIM
	def_bool $(dt_nodelabel_has_compat,i2c3,$(DT_COMPAT_NORDIC_NRF_TWIM))
	select NRFX_TWIM3
	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.

endif # I2C_NRFX