Skip to content

Commit

Permalink
drivers/slipdev : Expose to Kconfig
Browse files Browse the repository at this point in the history
Expose configurations to Kconfig
  • Loading branch information
akshaim committed Apr 29, 2020
1 parent 0dad2ea commit 099f426
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/Kconfig.net
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rsource "at86rf215/Kconfig"
rsource "cc110x/Kconfig"
rsource "dose/Kconfig"
rsource "mrf24j40/Kconfig"
rsource "slipdev/Kconfig"
source "$(RIOTCPU)/nrf52/radio/nrf802154/Kconfig"
endmenu # Network Device Drivers

Expand Down
4 changes: 4 additions & 0 deletions drivers/include/slipdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ extern "C" {
*
* @pre Needs to be power of two and `<= INT_MAX`
*/
#ifdef CONFIG_SLIPDEV_BUFSIZE_EXP
#define CONFIG_SLIPDEV_BUFSIZE (1<<CONFIG_SLIPDEV_BUFSIZE_EXP)
#endif

#ifndef CONFIG_SLIPDEV_BUFSIZE
#define CONFIG_SLIPDEV_BUFSIZE (2048U)
#endif
Expand Down
25 changes: 25 additions & 0 deletions drivers/slipdev/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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_MODULE_SLIPDEV
bool "Configure SLIPDEV driver"
depends on MODULE_SLIPDEV
help
Configure the SLIPDEV driver using Kconfig.

if KCONFIG_MODULE_SLIPDEV

config SLIPDEV_BUFSIZE_EXP
int "Buffer size (as exponent of 2^n)"
default 11
range 0 31
help
UART buffer size used for TX and RX buffers.
Reduce this value if your expected traffic does
not include full IPv6 MTU.
Value represents the exponent n of 2^n.

endif # KCONFIG_MODULE_SLIPDEV

0 comments on commit 099f426

Please sign in to comment.