libc/stream: provide lowerout_stream default initialization function

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-12-21 22:19:19 +08:00 committed by Alan Carvalho de Assis
parent b58cd6ad34
commit 0c95bf73dc
2 changed files with 22 additions and 0 deletions

View file

@ -309,6 +309,8 @@ extern "C"
# define EXTERN extern
#endif
extern struct lib_outstream_s g_lowoutstream;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/

View file

@ -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
****************************************************************************/