boards: nrf: Use i2c drivers from nrfx

Changed board definitions to use TWI and TWIM drivers provided by nrfx.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
This commit is contained in:
Mieszko Mierunski 2018-05-23 11:52:17 +02:00 committed by Carles Cufí
parent 1edc29c47f
commit 9c619d77e2
5 changed files with 105 additions and 56 deletions

View file

@ -28,22 +28,31 @@ endif # UART_NRFX
if I2C
config I2C_NRF5
config I2C_NRFX
def_bool y
if I2C_NRFX
config I2C_0
default y
def_bool y
endif #I2C_NRFX
if I2C_0
choice I2C_0_NRF_TYPE
default I2C_0_NRF_TWI
endchoice
config I2C_0_NRF_SDA_PIN
default 30
config I2C_0_NRF_SCL_PIN
default 0
endif # I2C_0
endif # I2C
if I2C_NRF5
config I2C_NRF5_0_GPIO_SCL_PIN
default 0
config I2C_NRF5_0_GPIO_SDA_PIN
default 30
endif
endif # BOARD_BBC_MICROBIT

View file

@ -34,22 +34,31 @@ endif # UART_NRFX
if I2C
config I2C_NRF5
config I2C_NRFX
def_bool y
if I2C_NRFX
config I2C_0
default y
def_bool y
endif #I2C_NRFX
if I2C_0
choice I2C_0_NRF_TYPE
default I2C_0_NRF_TWI
endchoice
config I2C_0_NRF_SDA_PIN
default 29
config I2C_0_NRF_SCL_PIN
default 30
endif # I2C_0
endif # I2C
if I2C_NRF5
config I2C_NRF5_0_GPIO_SCL_PIN
default 30
config I2C_NRF5_0_GPIO_SDA_PIN
default 29
endif # I2C_NRF5
endif # BOARD_NRF51_VBLUNO51

View file

@ -34,22 +34,31 @@ endif # UART_NRFX
if I2C
config I2C_NRF5
def_bool y
config I2C_NRFX
def_bool y
if I2C_NRFX
config I2C_0
default y
def_bool y
endif #I2C_NRFX
if I2C_0
choice I2C_0_NRF_TYPE
default I2C_0_NRF_TWIM
endchoice
config I2C_0_NRF_SDA_PIN
default 28
config I2C_0_NRF_SCL_PIN
default 2
endif # I2C_0
endif # I2C
if I2C_NRF5
config I2C_NRF5_0_GPIO_SCL_PIN
default 2
config I2C_NRF5_0_GPIO_SDA_PIN
default 28
endif # I2C_NRF5
endif # BOARD_NRF52_BLENANO2

View file

@ -31,10 +31,10 @@ config I2C
if I2C
config I2C_NRF5
config I2C_NRFX
def_bool y
if I2C_NRF5
if I2C_NRFX
config I2C_0
def_bool y
@ -42,24 +42,37 @@ config I2C_0
config I2C_1
def_bool y
endif #I2C_NRF5
endif #I2C_NRFX
if I2C_0
config I2C_NRF5_0_GPIO_SDA_PIN
choice I2C_0_NRF_TYPE
default I2C_0_NRF_TWIM
endchoice
config I2C_0_NRF_SDA_PIN
default 7
config I2C_NRF5_0_GPIO_SCL_PIN
config I2C_0_NRF_SCL_PIN
default 8
endif # I2C_0
if I2C_1
config I2C_NRF5_1_GPIO_SDA_PIN
choice I2C_1_NRF_TYPE
default I2C_1_NRF_TWIM
endchoice
config I2C_1_NRF_TWIM
def_bool y
config I2C_1_NRF_SDA_PIN
default 14
config I2C_NRF5_1_GPIO_SCL_PIN
config I2C_1_NRF_SCL_PIN
default 15
config GPIO_SX1509B

View file

@ -34,22 +34,31 @@ endif # UART_NRFX
if I2C
config I2C_NRF5
config I2C_NRFX
def_bool y
if I2C_NRFX
config I2C_0
default y
def_bool y
endif #I2C_NRFX
if I2C_0
choice I2C_0_NRF_TYPE
default I2C_0_NRF_TWIM
endchoice
config I2C_0_NRF_SDA_PIN
default 26
config I2C_0_NRF_SCL_PIN
default 27
endif # I2C_0
endif # I2C
if I2C_NRF5
config I2C_NRF5_0_GPIO_SCL_PIN
default 27
config I2C_NRF5_0_GPIO_SDA_PIN
default 26
endif # I2C_NRF5
endif # BOARD_NRF52_VBLUNO52