libc/stream: Implement lowoutstream_puts
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
4f3c73fb45
commit
8d16fa04df
1 changed files with 15 additions and 0 deletions
|
|
@ -51,6 +51,20 @@ static void lowoutstream_putc(FAR struct lib_outstream_s *this, int ch)
|
|||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lowoutstream_puts
|
||||
****************************************************************************/
|
||||
|
||||
static int lowoutstream_puts(FAR struct lib_outstream_s *this,
|
||||
FAR const void *buf, int len)
|
||||
{
|
||||
DEBUGASSERT(this);
|
||||
|
||||
this->nput += len;
|
||||
up_nputs(buf, len);
|
||||
return len;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
|
@ -73,6 +87,7 @@ static void lowoutstream_putc(FAR struct lib_outstream_s *this, int ch)
|
|||
void lib_lowoutstream(FAR struct lib_outstream_s *stream)
|
||||
{
|
||||
stream->putc = lowoutstream_putc;
|
||||
stream->puts = lowoutstream_puts;
|
||||
stream->flush = lib_noflush;
|
||||
stream->nput = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue