Skip to content

Commit

Permalink
fixup! usbus/cdc/acm: Expose configurations to Kconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrolanzieri committed Apr 7, 2020
1 parent 95cfbae commit fb364ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions sys/include/usb/usbus/cdc/acm.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ extern "C" {
* @brief Buffer size for STDIN and STDOUT data to and from USB when using
* the USBUS_CDC_ACM_STDIO module
*/
#ifdef CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE_EXP
#define CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE (1<<CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE_EXP)
#endif
#ifndef CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE
#define CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE (128)
#endif
Expand Down
11 changes: 8 additions & 3 deletions sys/usb/usbus/cdc/acm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ menuconfig KCONFIG_MODULE_USBUS_CDC_ACM

if KCONFIG_MODULE_USBUS_CDC_ACM

config USBUS_CDC_ACM_STDIO_BUF_SIZE
int "Buffer size for STDIN and STDOUT data"
default 128
config USBUS_CDC_ACM_STDIO_BUF_SIZE_EXP
int "Buffer size for STDIN and STDOUT data (as exponent of 2^n)"
default 7
range 0 31
depends on MODULE_STDIO_CDC_ACM
help
As buffer size ALWAYS needs to be power of two, this changes this option
represents the exponent of 2^n, which will be used as the size of the
buffer.

choice
bool "USB CDC ACM bulk endpoint size"
Expand Down

0 comments on commit fb364ed

Please sign in to comment.