--- a/master/canopen.c Thu Apr 20 14:38:41 2006 +0000
+++ b/master/canopen.c Mon Apr 24 10:47:03 2006 +0000
@@ -1,13 +1,33 @@
/******************************************************************************
*
- * c a n o p e n . c
- *
- * CANopen over EtherCAT
- *
* $Id$
*
+ * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
+ *
+ * This file is part of the IgH EtherCAT Master.
+ *
+ * The IgH EtherCAT Master is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2 of the License.
+ *
+ * The IgH EtherCAT Master is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the IgH EtherCAT Master; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
*****************************************************************************/
+/**
+ \file
+ Canopen-over-EtherCAT functions.
+*/
+
+/*****************************************************************************/
+
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
@@ -30,7 +50,7 @@
/**
Reads 32 bit of a CANopen SDO in expedited mode.
\return 0 in case of success, else < 0
- */
+*/
int ec_slave_sdo_read_exp(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -79,13 +99,13 @@
/**
Writes a CANopen SDO using expedited mode.
\return 0 in case of success, else < 0
- */
+*/
int ec_slave_sdo_write_exp(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
uint8_t sdo_subindex, /**< SDO subindex */
const uint8_t *sdo_data, /**< new value */
- size_t size
+ size_t size /**< Data size in bytes (1 - 4) */
)
{
uint8_t *data;
@@ -138,9 +158,9 @@
/**
Reads a CANopen SDO in normal mode.
\return 0 in case of success, else < 0
-
- \todo size
- */
+ \ingroup RealtimeInterface
+ \todo Make size non-pointer.
+*/
int ecrt_slave_sdo_read(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -516,7 +536,8 @@
Reads an 8-bit SDO in expedited mode.
See ec_slave_sdo_read_exp()
\return 0 in case of success, else < 0
- */
+ \ingroup RealtimeInterface
+*/
int ecrt_slave_sdo_read_exp8(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -536,7 +557,8 @@
Reads a 16-bit SDO in expedited mode.
See ec_slave_sdo_read_exp()
\return 0 in case of success, else < 0
- */
+ \ingroup RealtimeInterface
+*/
int ecrt_slave_sdo_read_exp16(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -556,7 +578,8 @@
Reads a 32-bit SDO in expedited mode.
See ec_slave_sdo_read_exp()
\return 0 in case of success, else < 0
- */
+ \ingroup RealtimeInterface
+*/
int ecrt_slave_sdo_read_exp32(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -575,7 +598,8 @@
/**
Writes an 8-bit SDO in expedited mode.
\return 0 in case of success, else < 0
- */
+ \ingroup RealtimeInterface
+*/
int ecrt_slave_sdo_write_exp8(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -591,7 +615,8 @@
/**
Writes a 16-bit SDO in expedited mode.
\return 0 in case of success, else < 0
- */
+ \ingroup RealtimeInterface
+*/
int ecrt_slave_sdo_write_exp16(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -609,7 +634,8 @@
/**
Writes a 32-bit SDO in expedited mode.
\return 0 in case of success, else < 0
- */
+ \ingroup RealtimeInterface
+*/
int ecrt_slave_sdo_write_exp32(ec_slave_t *slave, /**< EtherCAT slave */
uint16_t sdo_index, /**< SDO index */
@@ -624,6 +650,8 @@
/*****************************************************************************/
+/** \cond */
+
EXPORT_SYMBOL(ecrt_slave_sdo_read_exp8);
EXPORT_SYMBOL(ecrt_slave_sdo_read_exp16);
EXPORT_SYMBOL(ecrt_slave_sdo_read_exp32);
@@ -632,4 +660,6 @@
EXPORT_SYMBOL(ecrt_slave_sdo_write_exp32);
EXPORT_SYMBOL(ecrt_slave_sdo_read);
-/*****************************************************************************/
+/** \endcond */
+
+/*****************************************************************************/