mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
Basic Z16F serial driver functionality
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@577 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+21
-15
@@ -177,27 +177,33 @@ struct mountpt_operations
|
||||
};
|
||||
#endif /* CONFIG_DISABLE_MOUNTPOUNT */
|
||||
|
||||
/* These are the various kinds of operations that can be associated with
|
||||
* an inode.
|
||||
*/
|
||||
|
||||
union inode_ops_u
|
||||
{
|
||||
FAR const struct file_operations *i_ops; /* Driver operations for inode */
|
||||
#ifndef CONFIG_DISABLE_MOUNTPOUNT
|
||||
FAR const struct block_operations *i_bops; /* Block driver operations */
|
||||
FAR const struct mountpt_operations *i_mops; /* Operations on a mountpoint */
|
||||
#endif
|
||||
};
|
||||
|
||||
/* 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
|
||||
{
|
||||
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 */
|
||||
#endif
|
||||
} 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 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))
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user