summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-08-23 11:48:53 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-08-23 11:48:53 -0600
commitf5041805e65e1b75dee96a79d410cf427f51b67e (patch)
tree80c2bf0f00c0e6d6923e3e2ca80d1b3f81234018 /nuttx/include
parentb422de3ec5e3ef4f33c8fbd7e9ce3ae2cccfb262 (diff)
downloadpx4-nuttx-f5041805e65e1b75dee96a79d410cf427f51b67e.tar.gz
px4-nuttx-f5041805e65e1b75dee96a79d410cf427f51b67e.tar.bz2
px4-nuttx-f5041805e65e1b75dee96a79d410cf427f51b67e.zip
SourceForge bug #16 Fix IO pin map. Add CONFIG_SERIAL_TERMIOS support. From CCTSAO
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/serial/serial.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/serial/serial.h b/nuttx/include/nuttx/serial/serial.h
index 3c1de2225..9a3d9098a 100644
--- a/nuttx/include/nuttx/serial/serial.h
+++ b/nuttx/include/nuttx/serial/serial.h
@@ -46,6 +46,9 @@
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
+#ifdef CONFIG_SERIAL_TERMIOS
+# include <termios.h>
+#endif
#include <nuttx/fs/fs.h>
@@ -191,6 +194,8 @@ struct uart_ops_s
struct uart_dev_s
{
+ /* State data */
+
uint8_t open_count; /* Number of times the device has been opened */
volatile bool xmitwaiting; /* true: User waiting for space in xmit.buffer */
volatile bool recvwaiting; /* true: User waiting for data in recv.buffer */
@@ -198,14 +203,31 @@ struct uart_dev_s
volatile bool disconnected; /* true: Removable device is not connected */
#endif
bool isconsole; /* true: This is the serial console */
+
+ /* Terminal control flags */
+
+#ifdef CONFIG_SERIAL_TERMIOS
+ tcflag_t tc_iflag; /* Input modes */
+ tcflag_t tc_oflag; /* Output modes */
+ tcflag_t tc_lflag; /* Local modes */
+#endif
+
+ /* Semaphores */
+
sem_t closesem; /* Locks out new open while close is in progress */
sem_t xmitsem; /* Wakeup user waiting for space in xmit.buffer */
sem_t recvsem; /* Wakeup user waiting for data in recv.buffer */
#ifndef CONFIG_DISABLE_POLL
sem_t pollsem; /* Manages exclusive access to fds[] */
#endif
+
+ /* I/O buffers */
+
struct uart_buffer_s xmit; /* Describes transmit buffer */
struct uart_buffer_s recv; /* Describes receive buffer */
+
+ /* Driver interface */
+
FAR const struct uart_ops_s *ops; /* Arch-specific operations */
FAR void *priv; /* Used by the arch-specific logic */