summaryrefslogtreecommitdiff
path: root/components/dfs
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-11-29 00:04:55 +0000
committer[email protected] <[email protected]>2010-11-29 00:04:55 +0000
commit7a80d831c961d5c116fba457d3783459bbf41b6e (patch)
treebca232bc65e37ea52c5970e47dbc5fe37fdae2d0 /components/dfs
parent36a93a4e4a0174529c2b669aa6d23f03c2d10b3a (diff)
update doxygen comments.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1132 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/dfs')
-rw-r--r--components/dfs/src/dfs.c28
-rw-r--r--components/dfs/src/dfs_file.c7
-rw-r--r--components/dfs/src/dfs_fs.c13
-rw-r--r--components/dfs/src/dfs_posix.c10
4 files changed, 46 insertions, 12 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c
index 7d0d061b9a..d1ecda80eb 100644
--- a/components/dfs/src/dfs.c
+++ b/components/dfs/src/dfs.c
@@ -36,6 +36,11 @@ struct dfs_fd fd_table[DFS_FD_MAX];
#endif
/**
+ * @addtogroup DFS
+ */
+/*@{*/
+
+/**
* this function will initialize device file system.
*/
void dfs_init()
@@ -60,7 +65,7 @@ void dfs_init()
/**
* this function will lock device file system.
*
- * note: please don't invoke it on ISR.
+ * @note please don't invoke it on ISR.
*/
void dfs_lock()
{
@@ -73,7 +78,7 @@ void dfs_lock()
/**
* this function will lock device file system.
*
- * note: please don't invoke it on ISR.
+ * @note please don't invoke it on ISR.
*/
void dfs_unlock()
{
@@ -81,7 +86,8 @@ void dfs_unlock()
}
/**
- * this function will allocate a file descriptor.
+ * @ingroup Fd
+ * This function will allocate a file descriptor.
*
* @return -1 on failed or the allocated file descriptor.
*/
@@ -120,7 +126,9 @@ __result:
}
/**
- * this function will return a file descriptor structure according to file
+ * @ingroup Fd
+ *
+ * This function will return a file descriptor structure according to file
* descriptor.
*
* @return NULL on on this file descriptor or the file descriptor structure
@@ -147,7 +155,9 @@ struct dfs_fd* fd_get(int fd)
}
/**
- * this function will put the file descriptor.
+ * @ingroup Fd
+ *
+ * This function will put the file descriptor.
*/
void fd_put(struct dfs_fd* fd)
{
@@ -163,11 +173,13 @@ void fd_put(struct dfs_fd* fd)
};
/**
- * this function will return whether this file has been opend.
+ * @ingroup Fd
+ *
+ * This function will return whether this file has been opend.
*
* @param pathname the file path name.
*
- * @return 0 on file has been open, -1 on not open.
+ * @return 0 on file has been open successfully, -1 on open failed.
*/
int fd_is_open(const char* pathname)
{
@@ -337,3 +349,5 @@ up_one:
*dst = '\0';
return fullpath;
}
+/*@}*/
+
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c
index 88a9feacf8..95c9e9462a 100644
--- a/components/dfs/src/dfs_file.c
+++ b/components/dfs/src/dfs_file.c
@@ -17,6 +17,11 @@
#define NO_WORKING_DIR "system does not support working dir\n"
/**
+ * @addtogroup FileApi
+ */
+/*@{*/
+
+/**
* this function will open a file which specified by path with specified flags.
*
* @param fd the file descriptor pointer to return the corresponding result.
@@ -530,3 +535,5 @@ void cat(const char* filename)
FINSH_FUNCTION_EXPORT(cat, print file)
#endif
+/* @} */
+
diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c
index 9db83a16c9..f6e7867578 100644
--- a/components/dfs/src/dfs_fs.c
+++ b/components/dfs/src/dfs_fs.c
@@ -16,6 +16,11 @@
#include <dfs_file.h>
/**
+ * @addtogroup FsApi
+ */
+/*@{*/
+
+/**
* this function will register a file system instance to device file system.
*
* @param ops the file system instance to be registered.
@@ -177,9 +182,10 @@ rt_err_t dfs_filesystem_get_partition(struct dfs_partition* part, rt_uint8_t* bu
* this function will mount a file system on a specified path.
*
* @param device_name the name of device which includes a file system.
+ * @param path the path to mount a file system
* @param filesystemtype the file system type
* @param rwflag the read/write etc. flag.
- * @param data the privated data(parameter) for this file system.
+ * @param data the private data(parameter) for this file system.
*
* @return 0 on successful or -1 on failed.
*/
@@ -368,8 +374,8 @@ err1:
/**
* make a file system on the special device
*
- * @param fs_name, the file system name
- * @param device_name, the special device name
+ * @param fs_name the file system name
+ * @param device_name the special device name
*
* @return 0 on successful, otherwise failed.
*/
@@ -442,3 +448,4 @@ void df(const char* path)
FINSH_FUNCTION_EXPORT(df, get disk free);
#endif
+/* @} */
diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c
index 6a3517e89d..436230d849 100644
--- a/components/dfs/src/dfs_posix.c
+++ b/components/dfs/src/dfs_posix.c
@@ -16,6 +16,11 @@
#include <dfs_posix.h>
/**
+ * @addtogroup FsPosixApi
+ */
+/*@{*/
+
+/**
* this function is a POSIX compliant version, which will open a file and return
* a file descriptor.
*
@@ -165,7 +170,7 @@ int write(int fd, const void *buf, size_t len)
*
* @param fd the file descriptor.
* @param offset the offset to be seeked.
- * @param dir the directory of seek.
+ * @param whence the directory of seek.
*
* @return the current file position, or -1 on failed.
*/
@@ -627,7 +632,7 @@ int chdir(const char *path)
* working directory.
*
* @param buf the returned current directory.
- * @size the buffer size.
+ * @param size the buffer size.
*
* @return the returned current directory.
*/
@@ -643,3 +648,4 @@ char *getcwd(char *buf, size_t size)
return buf;
}
+/* @} */