Skip to content

Commit

Permalink
boards/adafruit-itsybitsy-m4: Model kconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKevinWeiss committed Dec 3, 2021
1 parent f0790eb commit aa8e0ec
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boards/adafruit-itsybitsy-m4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ config BOARD_ADAFRUIT_ITSYBITSY_M4
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
select MODULE_BOARDS_COMMON_SAMDX1-ARDUINO-BOOTLOADER if MODULE_STDIO_CDC_ACM
select MODULE_USB_BOARD_RESET if MODULE_STDIO_CDC_ACM

select HAVE_MTD_SPI_NOR
# This specific board requires SPI_ON_QSPI for the MTD_SPI_NOR
select MODULE_PERIPH_SPI_ON_QSPI if MODULE_MTD_SPI_NOR

source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"
6 changes: 6 additions & 0 deletions boards/adafruit-itsybitsy-m4/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_usbdev

# This configuration enables modules that are only available when using Kconfig
# module modelling
ifeq (1, $(TEST_KCONFIG))
KCONFIG_ADD_CONFIG += $(BOARDDIR)/adafruit-itsybitsy-m4.config
endif
3 changes: 3 additions & 0 deletions boards/adafruit-itsybitsy-m4/adafruit-itsybitsy-m4.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y
11 changes: 11 additions & 0 deletions boards/common/samdx1-arduino-bootloader/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2021 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.

config MODULE_BOARDS_COMMON_SAMDX1-ARDUINO-BOOTLOADER
bool
depends on TEST_KCONFIG
help
Common code of NRF51 boards
1 change: 1 addition & 0 deletions sys/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ rsource "timex/Kconfig"
rsource "tsrb/Kconfig"
rsource "uri_parser/Kconfig"
rsource "usb/Kconfig"
rsource "usb_board_reset/Kconfig"
rsource "vfs/Kconfig"
rsource "xtimer/Kconfig"
rsource "ztimer/Kconfig"
Expand Down
11 changes: 11 additions & 0 deletions sys/usb_board_reset/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2021 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#

config MODULE_USB_BOARD_RESET
bool "Trigger a board reset via USB CDC ACM"
depends on TEST_KCONFIG
depends on MODULE_USBUS_CDC_ACM

0 comments on commit aa8e0ec

Please sign in to comment.