summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-28 22:03:49 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-28 22:03:49 +0000
commita7fffa54ed01e92f3797af5707add81d8c9358cf (patch)
tree18e317106c391d9dd874559d38993d17d100f401 /nuttx/include
parent6db7527fa05112bad73b91e57d647d52caf3809a (diff)
downloadpx4-nuttx-a7fffa54ed01e92f3797af5707add81d8c9358cf.tar.gz
px4-nuttx-a7fffa54ed01e92f3797af5707add81d8c9358cf.tar.bz2
px4-nuttx-a7fffa54ed01e92f3797af5707add81d8c9358cf.zip
Basic Z16F serial driver functionality
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@577 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/fs.h36
-rw-r--r--nuttx/include/nuttx/serial.h6
2 files changed, 24 insertions, 18 deletions
diff --git a/nuttx/include/nuttx/fs.h b/nuttx/include/nuttx/fs.h
index 73c509629..111f47218 100644
--- a/nuttx/include/nuttx/fs.h
+++ b/nuttx/include/nuttx/fs.h
@@ -177,27 +177,33 @@ struct mountpt_operations
};
#endif /* CONFIG_DISABLE_MOUNTPOUNT */
-/* This structure represents one inode in the Nuttx psuedo-file system */
+/* These are the various kinds of operations that can be associated with
+ * an inode.
+ */
-struct inode
+union inode_ops_u
{
- FAR struct inode *i_peer; /* Pointer to same level inode */
- FAR struct inode *i_child; /* Pointer to lower level inode */
- sint16 i_crefs; /* References to inode */
- uint16 i_flags; /* flags for inode */
- union
- {
- const struct file_operations *i_ops; /* Driver operations for inode */
+ FAR const struct file_operations *i_ops; /* Driver operations for inode */
#ifndef CONFIG_DISABLE_MOUNTPOUNT
- const struct block_operations *i_bops; /* Block driver operations */
- const struct mountpt_operations *i_mops; /* Operations on a mountpoint */
+ FAR const struct block_operations *i_bops; /* Block driver operations */
+ FAR const struct mountpt_operations *i_mops; /* Operations on a mountpoint */
#endif
- } u;
+};
+
+/* This structure represents one inode in the Nuttx psuedo-file system */
+
+struct inode
+{
+ FAR struct inode *i_peer; /* Pointer to same level inode */
+ FAR struct inode *i_child; /* Pointer to lower level inode */
+ sint16 i_crefs; /* References to inode */
+ uint16 i_flags; /* Flags for inode */
+ union inode_ops_u u; /* Inode operations */
#ifdef CONFIG_FILE_MODE
- mode_t i_mode; /* Access mode flags */
+ mode_t i_mode; /* Access mode flags */
#endif
- FAR void *i_private; /* Per inode driver private data */
- char i_name[1]; /* Name of inode (variable) */
+ FAR void *i_private; /* Per inode driver private data */
+ char i_name[1]; /* Name of inode (variable) */
};
#define FSNODE_SIZE(n) (sizeof(struct inode) + (n))
diff --git a/nuttx/include/nuttx/serial.h b/nuttx/include/nuttx/serial.h
index 46da7800c..7741b9983 100644
--- a/nuttx/include/nuttx/serial.h
+++ b/nuttx/include/nuttx/serial.h
@@ -180,7 +180,7 @@ struct uart_ops_s
struct uart_dev_s
{
int open_count; /* The number of times
- * the device has been opened */
+ * the device has been opened */
boolean xmitwaiting; /* TRUE: User is waiting
* for space in xmit.buffer */
boolean recvwaiting; /* TRUE: User is waiting
@@ -194,8 +194,8 @@ struct uart_dev_s
* for sapce in recv.buffer */
struct uart_buffer_s xmit; /* Describes transmit buffer */
struct uart_buffer_s recv; /* Describes receive buffer */
- const struct uart_ops_s *ops; /* Arch-specifics operations */
- void *priv; /* Used by the arch-specific logic */
+ FAR const struct uart_ops_s *ops; /* Arch-specific operations */
+ FAR void *priv; /* Used by the arch-specific logic */
};
typedef struct uart_dev_s uart_dev_t;