From 1804fbfce9e3dc354ba10e955b807fe35cddeac9 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 18 Mar 2021 14:23:14 -0400 Subject: [PATCH] atsamd: Use "communication interface" menu option in Kconfig Signed-off-by: Kevin O'Connor --- src/atsamd/Kconfig | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/atsamd/Kconfig b/src/atsamd/Kconfig index 69429810..44ded6ca 100644 --- a/src/atsamd/Kconfig +++ b/src/atsamd/Kconfig @@ -14,6 +14,11 @@ config ATSAMD_SELECT select HAVE_STRICT_TIMING select HAVE_CHIPID +config HAVE_SERCOM + depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI + bool + default y + config BOARD_DIRECTORY string default "atsamd" @@ -127,15 +132,17 @@ config FLASH_START default 0x0000 config USBSERIAL - bool "Use USB for communication (instead of serial)" if MACH_SAMD21 - default y + bool config SERIAL - depends on !USBSERIAL bool - default y -config HAVE_SERCOM - depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI - bool - default y +choice + prompt "Communication interface" + config ATSAMD_USB + bool "USB" + select USBSERIAL + config ATSAMD_SERIAL + bool "Serial" + select SERIAL +endchoice endif