1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/dose/Kconfig
Benjamin Valentin 3399a6476a drivers/dose: calculate timeout based on symbol rate
A fixed timeout is either too long for high symbol rates or too short
for low symbol rates.

To fix this, calculate the timeout based on the symbol rate.

For this, the old 5ms timeout is equivalent to 58 bytes being transmitted
at 115200 baud (8 data bit + start & stop bit).

I rounded this to 50 bytes which should yield 4340 µs.
2021-08-25 20:48:54 +02:00

24 lines
715 B
Plaintext

# Copyright (c) 2020 Freie Universitaet Berlin
#
# 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.
#
menuconfig KCONFIG_USEMODULE_DOSE
bool "Configure DOSE driver"
depends on USEMODULE_DOSE
help
Configure the Differentially Operated Serial Ethernet (DOSE)
driver using Kconfig.
if KCONFIG_USEMODULE_DOSE
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 # KCONFIG_USEMODULE_DOSE