This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 0c95bf73dcebe1b311a124d73cdbd67d843846d1 Author: yinshengkai <[email protected]> AuthorDate: Thu Dec 21 22:19:19 2023 +0800 libc/stream: provide lowerout_stream default initialization function Signed-off-by: yinshengkai <[email protected]> --- include/nuttx/streams.h | 2 ++ libs/libc/stream/lib_lowoutstream.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/include/nuttx/streams.h b/include/nuttx/streams.h index aeed5bdb67..e6375ebba7 100644 --- a/include/nuttx/streams.h +++ b/include/nuttx/streams.h @@ -309,6 +309,8 @@ extern "C" # define EXTERN extern #endif +extern struct lib_outstream_s g_lowoutstream; + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/libs/libc/stream/lib_lowoutstream.c b/libs/libc/stream/lib_lowoutstream.c index 98f305a452..5bc248e014 100644 --- a/libs/libc/stream/lib_lowoutstream.c +++ b/libs/libc/stream/lib_lowoutstream.c @@ -33,6 +33,26 @@ #include "libc.h" +/**************************************************************************** + * Private Functions Prototypes + ****************************************************************************/ + +static void lowoutstream_putc(FAR struct lib_outstream_s *self, int ch); +static int lowoutstream_puts(FAR struct lib_outstream_s *self, + FAR const void *buf, int len); + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +struct lib_outstream_s g_lowoutstream = +{ + 0, + lowoutstream_putc, + lowoutstream_puts, + lib_noflush +}; + /**************************************************************************** * Private Functions ****************************************************************************/
