Some more doxygen documentation.
--- a/include/ecrt.h Tue Feb 12 16:37:11 2013 +0100
+++ b/include/ecrt.h Tue Feb 12 17:15:09 2013 +0100
@@ -39,7 +39,7 @@
* request a master, to map process data, to communicate with slaves via CoE
* and to configure and activate the bus.
*
- * Changed since 1.5:
+ * Changes in version 1.5.2:
*
* - Added redundancy_active flag to ec_domain_state_t.
* - Added ecrt_master_link_state() method and ec_master_link_state_t to query
--- a/master/doxygen.c Tue Feb 12 16:37:11 2013 +0100
+++ b/master/doxygen.c Tue Feb 12 17:15:09 2013 +0100
@@ -29,6 +29,10 @@
// This file only contains the doxygen mainpage.
+/** \file
+ * Doxygen mainpage only.
+ */
+
/*****************************************************************************/
/**
@@ -57,7 +61,7 @@
\section sec_license License
\verbatim
- Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
+ Copyright (C) 2006-2013 Florian Pose, Ingenieurgemeinschaft IgH
This file is part of the IgH EtherCAT Master.
--- a/master/foe.h Tue Feb 12 16:37:11 2013 +0100
+++ b/master/foe.h Tue Feb 12 17:15:09 2013 +0100
@@ -27,28 +27,34 @@
*
*****************************************************************************/
+/** \file
+ * FoE defines.
+ */
+
#ifndef __FOE_H__
#define __FOE_H__
/*****************************************************************************/
+/** FoE error enumeration type.
+ */
typedef enum {
- FOE_BUSY = 0,
- FOE_READY = 1,
- FOE_IDLE = 2,
- FOE_WC_ERROR = 3,
- FOE_RECEIVE_ERROR = 4,
- FOE_PROT_ERROR = 5,
- FOE_NODATA_ERROR = 6,
- FOE_PACKETNO_ERROR = 7,
- FOE_OPCODE_ERROR = 8,
- FOE_TIMEOUT_ERROR = 9,
- FOE_SEND_RX_DATA_ERROR = 10,
- FOE_RX_DATA_ACK_ERROR = 11,
- FOE_ACK_ERROR = 12,
- FOE_MBOX_FETCH_ERROR = 13,
- FOE_READ_NODATA_ERROR = 14,
- FOE_MBOX_PROT_ERROR = 15,
+ FOE_BUSY = 0, /**< Busy. */
+ FOE_READY = 1, /**< Ready. */
+ FOE_IDLE = 2, /**< Idle. */
+ FOE_WC_ERROR = 3, /**< Working counter error. */
+ FOE_RECEIVE_ERROR = 4, /**< Receive error. */
+ FOE_PROT_ERROR = 5, /**< Protocol error. */
+ FOE_NODATA_ERROR = 6, /**< No data error. */
+ FOE_PACKETNO_ERROR = 7, /**< Packet number error. */
+ FOE_OPCODE_ERROR = 8, /**< OpCode error. */
+ FOE_TIMEOUT_ERROR = 9, /**< Timeout error. */
+ FOE_SEND_RX_DATA_ERROR = 10, /**< Error sending received data. */
+ FOE_RX_DATA_ACK_ERROR = 11, /**< Error acknowledging received data. */
+ FOE_ACK_ERROR = 12, /**< Acknowledge error. */
+ FOE_MBOX_FETCH_ERROR = 13, /**< Error fetching data from mailbox. */
+ FOE_READ_NODATA_ERROR = 14, /**< No data while reading. */
+ FOE_MBOX_PROT_ERROR = 15, /**< Mailbox protocol error. */
} ec_foe_error_t;
/*****************************************************************************/
--- a/master/rtdm.c Tue Feb 12 16:37:11 2013 +0100
+++ b/master/rtdm.c Tue Feb 12 17:15:09 2013 +0100
@@ -26,6 +26,10 @@
*
****************************************************************************/
+/** \file
+ * RTDM interface.
+ */
+
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/mman.h>
@@ -45,7 +49,7 @@
/** Context structure for an open RTDM file handle.
*/
typedef struct {
- rtdm_user_info_t *user_info; /**< RTDM user info. */
+ rtdm_user_info_t *user_info; /**< RTDM user data. */
ec_ioctl_context_t ioctl_ctx; /**< Context structure. */
} ec_rtdm_context_t;
@@ -58,9 +62,13 @@
/****************************************************************************/
+/** Initialize an RTDM device.
+ *
+ * \return Zero on success, otherwise a negative error code.
+ */
int ec_rtdm_dev_init(
- ec_rtdm_dev_t *rtdm_dev,
- ec_master_t *master
+ ec_rtdm_dev_t *rtdm_dev, /**< EtherCAT RTDM device. */
+ ec_master_t *master /**< EtherCAT master. */
)
{
int ret;
@@ -105,8 +113,10 @@
/****************************************************************************/
+/** Clear an RTDM device.
+ */
void ec_rtdm_dev_clear(
- ec_rtdm_dev_t *rtdm_dev
+ ec_rtdm_dev_t *rtdm_dev /**< EtherCAT RTDM device. */
)
{
int ret;
@@ -125,11 +135,13 @@
/****************************************************************************/
/** Driver open.
+ *
+ * \return Always zero (success).
*/
int ec_rtdm_open(
- struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info,
- int oflags
+ struct rtdm_dev_context *context, /**< Context. */
+ rtdm_user_info_t *user_info, /**< User data. */
+ int oflags /**< Open flags. */
)
{
ec_rtdm_context_t *ctx = (ec_rtdm_context_t *) context->dev_private;
@@ -153,9 +165,13 @@
/****************************************************************************/
/** Driver close.
- */
-int ec_rtdm_close(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info)
+ *
+ * \return Always zero (success).
+ */
+int ec_rtdm_close(
+ struct rtdm_dev_context *context, /**< Context. */
+ rtdm_user_info_t *user_info /**< User data. */
+ )
{
ec_rtdm_context_t *ctx = (ec_rtdm_context_t *) context->dev_private;
ec_rtdm_dev_t *rtdm_dev = (ec_rtdm_dev_t *) context->device->device_data;
@@ -174,6 +190,8 @@
/****************************************************************************/
/** Driver ioctl.
+ *
+ * \return ioctl() return code.
*/
int ec_rtdm_ioctl(
struct rtdm_dev_context *context, /**< Context. */
@@ -196,8 +214,13 @@
/****************************************************************************/
/** Memory-map process data to user space.
- */
-int ec_rtdm_mmap(ec_ioctl_context_t *ioctl_ctx, void **user_address)
+ *
+ * \return Zero on success, otherwise a negative error code.
+ */
+int ec_rtdm_mmap(
+ ec_ioctl_context_t *ioctl_ctx, /**< Context. */
+ void **user_address /**< Userspace address. */
+ )
{
ec_rtdm_context_t *ctx =
container_of(ioctl_ctx, ec_rtdm_context_t, ioctl_ctx);
--- a/master/rtdm.h Tue Feb 12 16:37:11 2013 +0100
+++ b/master/rtdm.h Tue Feb 12 17:15:09 2013 +0100
@@ -24,6 +24,10 @@
*
****************************************************************************/
+/** \file
+ * RTDM interface.
+ */
+
#ifndef __EC_RTDM_H__
#define __EC_RTDM_H__