Skip to content

Commit

Permalink
Merge pull request #20541 from chrysn-pull-requests/doc-shell-constraint
Browse files Browse the repository at this point in the history
shell/doc: Point users who run into shell buffer issues to the stdin buffer
  • Loading branch information
MrKevinWeiss authored Apr 9, 2024
2 parents 93b05d5 + b0bec02 commit 5c4480d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sys/include/shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ extern "C" {

/**
* @brief Default shell buffer size (maximum line length shell can handle)
*
* @warning When terminals that buffer input and send the full command line in
* one go are used on stdin implementations with fast bursts of data,
* it may be necessary to increase the @ref STDIO_RX_BUFSIZE to make
* practical use of this buffer, especially because the current mechanism of
* passing stdin (`isrpipe_t stdin_isrpipe`) does not support backpressure
* and overflows silently. As a consequence, commands through such terminals
* appear to be truncated at @ref STDIO_RX_BUFSIZE bytes (defaulting to 64)
* unless the command is sent in parts (on many terminals, by presing Ctrl-D
* half way through the command).
*
* For example, this affects systems with direct USB stdio (@ref
* usbus_cdc_acm_stdio) with the default terminal `pyterm`.
*/
#define SHELL_DEFAULT_BUFSIZE (128)

Expand Down

0 comments on commit 5c4480d

Please sign in to comment.