1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/dose: model in Kconfig

This commit is contained in:
Leandro Lanzieri 2022-03-02 10:57:57 +01:00
parent bc10e6ec79
commit 35aba45c1c
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593
4 changed files with 61 additions and 0 deletions

View File

@ -21,3 +21,45 @@ config DOSE_TIMEOUT_BYTES
the remote side died within a transaction.
endif # KCONFIG_USEMODULE_DOSE
menuconfig MODULE_DOSE
bool "Differentially Operated Serial Ethernet (DOSE)"
depends on TEST_KCONFIG
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on HAS_PERIPH_UART
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
select MODULE_PERIPH_UART
select MODULE_PERIPH_UART_COLLISION if HAS_PERIPH_UART_COLLISION
select MODULE_PERIPH_UART_RXSTART_IRQ if HAS_PERIPH_UART_RXSTART_IRQ
select MODULE_CHUNKED_RINGBUFFER
select MODULE_EUI_PROVIDER
select MODULE_IOLIST
select MODULE_NETDEV_ETH
select MODULE_RANDOM
select MODULE_ZTIMER
select ZTIMER_USEC
help
Allows RIOT nodes to communicate by Ethernet over a serial bus.
if MODULE_DOSE
config MODULE_DOSE_WATCHDOG
bool "Use a watchdog timer"
depends on HAS_PERIPH_TIMER_PERIODIC
select MODULE_PERIPH_TIMER_PERIODIC
help
Say y to utilize a dedicated hardware timer (DOSE_TIMER_DEV which should
be configured in board.h) to periodically check if any interface does
not make progress receiving a frame and abort the RX process. This
speeds up the more critical RX path.
config DOSE_TIMEOUT_BYTES
int "Transaction timeout in bytes"
default 50
help
Timeout, in bytes at the set baudrate, to bring the driver back into idle state if
the remote side died within a transaction.
endif # MODULE_DOSE

11
tests/driver_dose/Kconfig Normal file
View File

@ -0,0 +1,11 @@
# Copyright (c) 2022 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 APPLICATION
bool
default y
imply MODULE_DOSE_WATCHDOG if BOARD_SAMR21_XPRO || BOARD_SAME54_XPRO

View File

@ -19,4 +19,6 @@ endif
INCLUDES += -I$(APPDIR)
SHOULD_RUN_KCONFIG ?=
include $(RIOTBASE)/Makefile.include

View File

@ -0,0 +1,6 @@
CONFIG_MODULE_TEST_UTILS_NETDEV_ETH_MINIMAL=y
CONFIG_MODULE_DOSE=y
# Should be autoselecting the MODULE_PRNG_HWRNG if possible
# Since the makefile cannot we have to override until end of migration
# Remove when TEST_KCONFIG is complete
CONFIG_MODULE_PRNG_MUSL_LCG=y