diff options
Diffstat (limited to 'nuttx/lib/lib_rawstream.c')
-rw-r--r-- | nuttx/lib/lib_rawstream.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/nuttx/lib/lib_rawstream.c b/nuttx/lib/lib_rawstream.c index 899175620..068199db5 100644 --- a/nuttx/lib/lib_rawstream.c +++ b/nuttx/lib/lib_rawstream.c @@ -1,7 +1,7 @@ -/************************************************************ - * lib_rawstream.c +/**************************************************************************** + * lib/lib_rawstream.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,23 +31,27 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <unistd.h> #include <errno.h> #include "lib_internal.h" -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -static void rawstream_putc(struct lib_stream_s *this, int ch) +/**************************************************************************** + * Name: rawstream_putc + ****************************************************************************/ + +static void rawstream_putc(FAR struct lib_stream_s *this, int ch) { - struct lib_rawstream_s *rthis = (struct lib_rawstream_s *)this; + FAR struct lib_rawstream_s *rthis = (FAR struct lib_rawstream_s *)this; char buffer = ch; if (this && rthis->fd >= 0) { @@ -64,11 +68,15 @@ static void rawstream_putc(struct lib_stream_s *this, int ch) } } -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ + +/**************************************************************************** + * Name: lib_rawstream + ****************************************************************************/ -void lib_rawstream(struct lib_rawstream_s *rawstream, int fd) +void lib_rawstream(FAR struct lib_rawstream_s *rawstream, int fd) { rawstream->public.put = rawstream_putc; rawstream->public.nput = 0; |