master/slave_config.h
author Florian Pose <fp@igh-essen.com>
Wed, 02 Jun 2010 22:54:08 +0200
changeset 1939 1ba48f78a0a5
parent 1921 d9cf40facbc4
child 1966 23c638a81fe7
child 1989 6aa393418fb3
permissions -rw-r--r--
Fixed bug that caused the configuration not to be cleared when reserved but
not activated and then releasing.
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
/******************************************************************************
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
 *  $Id$
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
 *
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
     5
 *  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
 *  This file is part of the IgH EtherCAT Master.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
 *
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
     9
 *  The IgH EtherCAT Master is free software; you can redistribute it and/or
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    10
 *  modify it under the terms of the GNU General Public License version 2, as
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    11
 *  published by the Free Software Foundation.
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
 *
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    13
 *  The IgH EtherCAT Master is distributed in the hope that it will be useful,
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    16
 *  Public License for more details.
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
 *
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    18
 *  You should have received a copy of the GNU General Public License along
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1312
diff changeset
    19
 *  with the IgH EtherCAT Master; if not, write to the Free Software
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
 *
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1351
diff changeset
    22
 *  ---
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1351
diff changeset
    23
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1351
diff changeset
    24
 *  The license mentioned above concerns the source code only. Using the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1351
diff changeset
    25
 *  EtherCAT technology and brand is only permitted in compliance with the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1351
diff changeset
    26
 *  industrial property and similar rights of Beckhoff Automation GmbH.
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
 *****************************************************************************/
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
/**
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
   \file
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
   EtherCAT slave configuration structure.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
*/
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
/*****************************************************************************/
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
883
4963e22a267a Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents: 879
diff changeset
    37
#ifndef __EC_SLAVE_CONFIG_H__
4963e22a267a Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents: 879
diff changeset
    38
#define __EC_SLAVE_CONFIG_H__
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
#include <linux/list.h>
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
#include "globals.h"
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
#include "slave.h"
1055
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1010
diff changeset
    44
#include "sync_config.h"
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
#include "fmmu_config.h"
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
/*****************************************************************************/
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
1921
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    49
/** Convenience macro for printing configuration-specific information to
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    50
 * syslog.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    51
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    52
 * This will print the message in \a fmt with a prefixed
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    53
 * "EtherCAT <INDEX> <ALIAS>:<POSITION>: ", where INDEX is the master index
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    54
 * and ALIAS and POSITION identify the configuration.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    55
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    56
 * \param sc EtherCAT slave configuration
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    57
 * \param fmt format string (like in printf())
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    58
 * \param args arguments (optional)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    59
 */
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    60
#define EC_CONFIG_INFO(sc, fmt, args...) \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    61
    printk(KERN_INFO "EtherCAT %u %u:%u: " fmt, sc->master->index, \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    62
            sc->alias, sc->position, ##args)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    63
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    64
/** Convenience macro for printing configuration-specific errors to syslog.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    65
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    66
 * This will print the message in \a fmt with a prefixed
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    67
 * "EtherCAT <INDEX> <ALIAS>:<POSITION>: ", where INDEX is the master index
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    68
 * and ALIAS and POSITION identify the configuration.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    69
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    70
 * \param sc EtherCAT slave configuration
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    71
 * \param fmt format string (like in printf())
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    72
 * \param args arguments (optional)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    73
 */
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    74
#define EC_CONFIG_ERR(sc, fmt, args...) \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    75
    printk(KERN_ERR "EtherCAT ERROR %u %u:%u: " fmt, sc->master->index, \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    76
            sc->alias, sc->position, ##args)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    77
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    78
/** Convenience macro for printing configuration-specific warnings to syslog.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    79
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    80
 * This will print the message in \a fmt with a prefixed
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    81
 * "EtherCAT <INDEX> <ALIAS>:<POSITION>: ", where INDEX is the master index
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    82
 * and ALIAS and POSITION identify the configuration.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    83
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    84
 * \param sc EtherCAT slave configuration
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    85
 * \param fmt format string (like in printf())
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    86
 * \param args arguments (optional)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    87
 */
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    88
#define EC_CONFIG_WARN(sc, fmt, args...) \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    89
    printk(KERN_WARNING "EtherCAT WARNING %u %u:%u: " fmt, \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    90
            sc->master->index, sc->alias, sc->position, ##args)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    91
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    92
/** Convenience macro for printing configuration-specific debug messages to
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    93
 * syslog.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    94
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    95
 * This will print the message in \a fmt with a prefixed
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    96
 * "EtherCAT <INDEX> <ALIAS>:<POSITION>: ", where INDEX is the master index
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    97
 * and ALIAS and POSITION identify the configuration.
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    98
 *
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
    99
 * \param sc EtherCAT slave configuration
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   100
 * \param fmt format string (like in printf())
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   101
 * \param args arguments (optional)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   102
 */
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   103
#define EC_CONFIG_DBG(sc, level, fmt, args...) \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   104
    do { \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   105
        if (sc->master->debug_level >= level) { \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   106
            printk(KERN_DEBUG "EtherCAT DEBUG %u %u:%u: " fmt, \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   107
                    sc->master->index, sc->alias, sc->position, ##args); \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   108
        } \
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   109
    } while (0)
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   110
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   111
/*****************************************************************************/
d9cf40facbc4 Improved syslog macros.
Florian Pose <fp@igh-essen.com>
parents: 1907
diff changeset
   112
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   113
/** EtherCAT slave configuration.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   114
 */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   115
struct ec_slave_config {
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   116
    struct list_head list; /**< List item. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   117
    ec_master_t *master; /**< Master owning the slave configuration. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   118
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   119
    uint16_t alias; /**< Slave alias. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   120
    uint16_t position; /**< Index after alias. If alias is zero, this is the
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   121
                         ring position. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   122
    uint32_t vendor_id; /**< Slave vendor ID. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   123
    uint32_t product_code; /**< Slave product code. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   124
1509
a864688e7de5 Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents: 1507
diff changeset
   125
    uint16_t watchdog_divider; /**< Watchdog divider as a number of 40ns
a864688e7de5 Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents: 1507
diff changeset
   126
                                 intervals (see spec. reg. 0x0400). */
a864688e7de5 Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents: 1507
diff changeset
   127
    uint16_t watchdog_intervals; /**< Process data watchdog intervals (see
a864688e7de5 Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents: 1507
diff changeset
   128
                                   spec. reg. 0x0420). */
a864688e7de5 Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents: 1507
diff changeset
   129
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   130
    ec_slave_t *slave; /**< Slave pointer. This is \a NULL, if the slave is
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   131
                         offline. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   132
1082
ff06c58e269c Renamed ecrt_slave_config_sync_managers() to ecrt_slave_config_pdos();
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
   133
    ec_sync_config_t sync_configs[EC_MAX_SYNC_MANAGERS]; /**< Sync manager
1055
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1010
diff changeset
   134
                                                   configurations. */
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1010
diff changeset
   135
    ec_fmmu_config_t fmmu_configs[EC_MAX_FMMUS]; /**< FMMU configurations. */
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1010
diff changeset
   136
    uint8_t used_fmmus; /**< Number of FMMUs used. */
1907
dd276ae226b4 Added missing code documentation.
Florian Pose <fp@igh-essen.com>
parents: 1844
diff changeset
   137
    unsigned int used_for_fmmu_datagram[EC_DIR_COUNT]; /**< Number of FMMUs
dd276ae226b4 Added missing code documentation.
Florian Pose <fp@igh-essen.com>
parents: 1844
diff changeset
   138
                                                         used for process data
dd276ae226b4 Added missing code documentation.
Florian Pose <fp@igh-essen.com>
parents: 1844
diff changeset
   139
                                                         exchange datagrams. */
1438
1d30b96bb04f Replaced ecrt_slave_config_dc_cycle_times() and ecrt_slave_config_dc_shift_times() by ecrt_slave_config_dc_sync_signals().
Florian Pose <fp@igh-essen.com>
parents: 1412
diff changeset
   140
    uint16_t dc_assign_activate; /**< Vendor-specific AssignActivate word. */
1d30b96bb04f Replaced ecrt_slave_config_dc_cycle_times() and ecrt_slave_config_dc_shift_times() by ecrt_slave_config_dc_sync_signals().
Florian Pose <fp@igh-essen.com>
parents: 1412
diff changeset
   141
    ec_sync_signal_t dc_sync[EC_SYNC_SIGNAL_COUNT]; /**< DC sync signals. */
1392
8fcc1d0987c1 DC cyclic operation and slave configuration. TBC...
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
   142
1327
4d179b06dd3c merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
   143
    struct list_head sdo_configs; /**< List of SDO configurations. */
4d179b06dd3c merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
   144
    struct list_head sdo_requests; /**< List of SDO requests. */
1209
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   145
    struct list_head voe_handlers; /**< List of VoE handlers. */
1844
b6bd88d4806b Added ecrt_slave_config_idn() method to store SoE IDN configurations.
Florian Pose <fp@igh-essen.com>
parents: 1798
diff changeset
   146
    struct list_head soe_configs; /**< List of SoE configurations. */
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   147
};
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   148
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   149
/*****************************************************************************/
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   150
995
54149a703c47 Removed kobject from slave_config.
Florian Pose <fp@igh-essen.com>
parents: 990
diff changeset
   151
void ec_slave_config_init(ec_slave_config_t *, ec_master_t *, uint16_t,
1010
6672b86e7b10 Reverted revision number checking from r1228.
Florian Pose <fp@igh-essen.com>
parents: 1009
diff changeset
   152
        uint16_t, uint32_t, uint32_t);
995
54149a703c47 Removed kobject from slave_config.
Florian Pose <fp@igh-essen.com>
parents: 990
diff changeset
   153
void ec_slave_config_clear(ec_slave_config_t *);
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   154
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   155
int ec_slave_config_attach(ec_slave_config_t *);
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   156
void ec_slave_config_detach(ec_slave_config_t *);
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   157
1055
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1010
diff changeset
   158
void ec_slave_config_load_default_sync_config(ec_slave_config_t *);
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   159
990
4f223f3df05a Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   160
unsigned int ec_slave_config_sdo_count(const ec_slave_config_t *);
4f223f3df05a Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   161
const ec_sdo_request_t *ec_slave_config_get_sdo_by_pos_const(
4f223f3df05a Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   162
        const ec_slave_config_t *, unsigned int);
1351
cf8f08631c8e Added ec_slave_config_find_sdo_request().
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   163
ec_sdo_request_t *ec_slave_config_find_sdo_request(ec_slave_config_t *,
cf8f08631c8e Added ec_slave_config_find_sdo_request().
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   164
        unsigned int);
1263
f44720defbc5 Added ec_slave_config_find_voe_handler().
Florian Pose <fp@igh-essen.com>
parents: 1209
diff changeset
   165
ec_voe_handler_t *ec_slave_config_find_voe_handler(ec_slave_config_t *,
1507
68e89abadd19 Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents: 1438
diff changeset
   166
        unsigned int);
990
4f223f3df05a Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   167
1312
74853e018898 Created backend versions of all API functions returing a pointer; using
Florian Pose <fp@igh-essen.com>
parents: 1263
diff changeset
   168
ec_sdo_request_t *ecrt_slave_config_create_sdo_request_err(
74853e018898 Created backend versions of all API functions returing a pointer; using
Florian Pose <fp@igh-essen.com>
parents: 1263
diff changeset
   169
        ec_slave_config_t *, uint16_t, uint8_t, size_t);
74853e018898 Created backend versions of all API functions returing a pointer; using
Florian Pose <fp@igh-essen.com>
parents: 1263
diff changeset
   170
ec_voe_handler_t *ecrt_slave_config_create_voe_handler_err(
74853e018898 Created backend versions of all API functions returing a pointer; using
Florian Pose <fp@igh-essen.com>
parents: 1263
diff changeset
   171
        ec_slave_config_t *, size_t);
74853e018898 Created backend versions of all API functions returing a pointer; using
Florian Pose <fp@igh-essen.com>
parents: 1263
diff changeset
   172
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   173
/*****************************************************************************/
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   174
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   175
#endif