summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/device.c b/src/device.c
index 2c1d31f23e..6e22c2b692 100644
--- a/src/device.c
+++ b/src/device.c
@@ -39,13 +39,13 @@
#endif /* RT_USING_DEVICE_OPS */
/**
- * @brief This function registers a device driver with specified name.
+ * @brief This function registers a device driver with a specified name.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
- * @param name the device driver's name.
+ * @param name is the device driver's name.
*
- * @param flags the capabilities flag of device.
+ * @param flags is the capabilities flag of device.
*
* @return the error code, RT_EOK on initialization successfully.
*/
@@ -76,7 +76,7 @@ RTM_EXPORT(rt_device_register);
/**
* @brief This function removes a previously registered device driver.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
* @return the error code, RT_EOK on successfully.
*/
@@ -95,7 +95,7 @@ RTM_EXPORT(rt_device_unregister);
/**
* @brief This function finds a device driver by specified name.
*
- * @param name the device driver's name.
+ * @param name is the device driver's name.
*
* @return the registered device driver on successful, or RT_NULL on failure.
*/
@@ -109,9 +109,9 @@ RTM_EXPORT(rt_device_find);
/**
* @brief This function creates a device object with user data size.
*
- * @param type the kind type of this device object.
+ * @param type is the type of the device object.
*
- * @param attach_size the size of user data.
+ * @param attach_size is the size of user data.
*
* @return the allocated device object, or RT_NULL when failed.
*/
@@ -139,7 +139,7 @@ RTM_EXPORT(rt_device_create);
/**
* @brief This function destroy the specific device object.
*
- * @param dev the specific device object.
+ * @param dev is a specific device object.
*/
void rt_device_destroy(rt_device_t dev)
{
@@ -158,7 +158,7 @@ RTM_EXPORT(rt_device_destroy);
/**
* @brief This function will initialize the specified device.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
* @return the result, RT_EOK on successfully.
*/
@@ -192,9 +192,9 @@ rt_err_t rt_device_init(rt_device_t dev)
/**
* @brief This function will open a device.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
- * @param oflag the flags for device open.
+ * @param oflag is the flags for device open.
*
* @return the result, RT_EOK on successfully.
*/
@@ -259,7 +259,7 @@ RTM_EXPORT(rt_device_open);
/**
* @brief This function will close a device.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
* @return the result, RT_EOK on successfully.
*/
@@ -295,13 +295,13 @@ RTM_EXPORT(rt_device_close);
/**
* @brief This function will read some data from a device.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
- * @param pos the position of reading.
+ * @param pos is the position when reading.
*
- * @param buffer the data buffer to save read data.
+ * @param buffer is a data buffer to save the read data.
*
- * @param size the size of buffer.
+ * @param size is the size of buffer.
*
* @return the actually read size on successful, otherwise negative returned.
*
@@ -337,13 +337,13 @@ RTM_EXPORT(rt_device_read);
/**
* @brief This function will write some data to a device.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
- * @param pos the position of written.
+ * @param pos is the position when writing.
*
- * @param buffer the data buffer to be written to device.
+ * @param buffer is the data buffer to be written to device.
*
- * @param size the size of buffer.
+ * @param size is the size of buffer.
*
* @return the actually written size on successful, otherwise negative returned.
*
@@ -379,11 +379,11 @@ RTM_EXPORT(rt_device_write);
/**
* @brief This function will perform a variety of control functions on devices.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
- * @param cmd the command sent to device.
+ * @param cmd is the command sent to device.
*
- * @param arg the argument of command.
+ * @param arg is the argument of command.
*
* @return the result, -RT_ENOSYS for failed.
*/
@@ -406,11 +406,11 @@ RTM_EXPORT(rt_device_control);
* @brief This function will set the reception indication callback function. This callback function
* is invoked when this device receives data.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
- * @param rx_ind the indication callback function.
+ * @param rx_ind is the indication callback function.
*
- * @return RT_EOK.
+ * @return RT_EOK
*/
rt_err_t
rt_device_set_rx_indicate(rt_device_t dev,
@@ -426,14 +426,14 @@ rt_device_set_rx_indicate(rt_device_t dev,
RTM_EXPORT(rt_device_set_rx_indicate);
/**
- * @brief This function will set the indication callback function when device has
- * written data to physical hardware.
+ * @brief This function will set a callback function. The callback function
+ * will be called when device has written data to physical hardware.
*
- * @param dev the pointer of device driver structure.
+ * @param dev is the pointer of device driver structure.
*
- * @param tx_done the indication callback function.
+ * @param tx_done is the indication callback function.
*
- * @return RT_EOK.
+ * @return RT_EOK
*/
rt_err_t
rt_device_set_tx_complete(rt_device_t dev,