summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-14 15:21:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-14 15:21:04 +0000
commitf62084035feaf8b9a22804821b22e2a3c15e6eda (patch)
treee2d1548a5bf0d8e33386a178103c756473b90ad6 /nuttx/include
parent6f8fd8927787deda605f6fb070bab21ee4022084 (diff)
downloadpx4-nuttx-f62084035feaf8b9a22804821b22e2a3c15e6eda.tar.gz
px4-nuttx-f62084035feaf8b9a22804821b22e2a3c15e6eda.tar.bz2
px4-nuttx-f62084035feaf8b9a22804821b22e2a3c15e6eda.zip
Implemented line-oriented buffering for std output
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3606 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/streams.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/nuttx/include/nuttx/streams.h b/nuttx/include/nuttx/streams.h
index cdba45e9e..e8b6e2b2d 100644
--- a/nuttx/include/nuttx/streams.h
+++ b/nuttx/include/nuttx/streams.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/streams.h
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,20 +56,24 @@
struct lib_instream_s;
struct lib_outstream_s;
-typedef int (*lib_getc_t)(FAR struct lib_instream_s *this);
+typedef int (*lib_getc_t)(FAR struct lib_instream_s *this);
typedef void (*lib_putc_t)(FAR struct lib_outstream_s *this, int ch);
+typedef int (*lib_flush_t)(FAR struct lib_outstream_s *this);
struct lib_instream_s
{
- lib_getc_t get; /* Pointer to function to get one character */
- int nget; /* Total number of characters gotten. Written
+ lib_getc_t get; /* Pointer to function to get one character */
+ int nget; /* Total number of characters gotten. Written
* by get method, readable by user */
};
struct lib_outstream_s
{
- lib_putc_t put; /* Pointer to function to put one character */
- int nput; /* Total number of characters put. Written
+ lib_putc_t put; /* Pointer to function to put one character */
+#ifdef CONFIG_STDIO_LINEBUFFER
+ lib_flush_t flush; /* Pointer to function flush buffered characters */
+#endif
+ int nput; /* Total number of characters put. Written
* by put method, readable by user */
};