master/globals.h
author Florian Pose <fp@igh-essen.com>
Wed, 22 Oct 2008 08:17:34 +0000
changeset 1291 9ce46c40a023
parent 1217 e8a9785e63c3
child 1312 74853e018898
permissions -rw-r--r--
Userspace applications.
39
6965c23a6826 likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents: 19
diff changeset
     1
/******************************************************************************
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *
39
6965c23a6826 likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents: 19
diff changeset
     3
 *  $Id$
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
 *
197
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
     5
 *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
     6
 *
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
     7
 *  This file is part of the IgH EtherCAT Master.
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
     8
 *
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
     9
 *  The IgH EtherCAT Master is free software; you can redistribute it
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    10
 *  and/or modify it under the terms of the GNU General Public License
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    11
 *  as published by the Free Software Foundation; either version 2 of the
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    12
 *  License, or (at your option) any later version.
197
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    13
 *
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    14
 *  The IgH EtherCAT Master is distributed in the hope that it will be
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    15
 *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    17
 *  GNU General Public License for more details.
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    18
 *
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    19
 *  You should have received a copy of the GNU General Public License
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    20
 *  along with the IgH EtherCAT Master; if not, write to the Free Software
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    21
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 196
diff changeset
    22
 *
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    23
 *  The right to use EtherCAT Technology is granted and comes free of
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    24
 *  charge under condition of compatibility of product made by
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    25
 *  Licensee. People intending to distribute/sell products based on the
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    26
 *  code, have to sign an agreement to guarantee that products using
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    27
 *  software based on IgH EtherCAT master stay compatible with the actual
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    28
 *  EtherCAT specification (which are released themselves as an open
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    29
 *  standard) as the (only) precondition to have the right to use EtherCAT
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    30
 *  Technology, IP and trade marks.
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 228
diff changeset
    31
 *
39
6965c23a6826 likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents: 19
diff changeset
    32
 *****************************************************************************/
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    34
/** \file
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    35
 * Global definitions and macros.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    36
 */
199
04ecf40fc2e9 Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents: 197
diff changeset
    37
04ecf40fc2e9 Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents: 197
diff changeset
    38
/*****************************************************************************/
04ecf40fc2e9 Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents: 197
diff changeset
    39
883
4963e22a267a Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents: 872
diff changeset
    40
#ifndef __EC_MASTER_GLOBALS_H__
4963e22a267a Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents: 872
diff changeset
    41
#define __EC_MASTER_GLOBALS_H__
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
152
9654f3cf588d Plugfest: Globale Debug-Funktionen f?r Frame-Daten.
Florian Pose <fp@igh-essen.com>
parents: 141
diff changeset
    43
#include <linux/types.h>
9654f3cf588d Plugfest: Globale Debug-Funktionen f?r Frame-Daten.
Florian Pose <fp@igh-essen.com>
parents: 141
diff changeset
    44
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 427
diff changeset
    45
#include "../globals.h"
1209
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
    46
#include "../include/ecrt.h"
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    47
196
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    48
/******************************************************************************
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    49
 * EtherCAT master
196
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    50
 *****************************************************************************/
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 39
diff changeset
    51
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    52
/** Clock frequency for the EoE state machines. */
228
ec516cfa207e Added EC_EOE_FREQUENCY
Florian Pose <fp@igh-essen.com>
parents: 214
diff changeset
    53
#define EC_EOE_FREQUENCY 1000
ec516cfa207e Added EC_EOE_FREQUENCY
Florian Pose <fp@igh-essen.com>
parents: 214
diff changeset
    54
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    55
/** Datagram timeout in microseconds. */
325
7833cf70c4f2 VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents: 293
diff changeset
    56
#define EC_IO_TIMEOUT 500
7833cf70c4f2 VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents: 293
diff changeset
    57
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    58
/** Number of state machine retries on datagram timeout. */
505
bc443ca0077f State machines re-send datagrams on timeout.
Florian Pose <fp@igh-essen.com>
parents: 453
diff changeset
    59
#define EC_FSM_RETRIES 3
bc443ca0077f State machines re-send datagrams on timeout.
Florian Pose <fp@igh-essen.com>
parents: 453
diff changeset
    60
814
a51f857b1b2d Renamed [PS]DO to [PS]do.
Florian Pose <fp@igh-essen.com>
parents: 809
diff changeset
    61
/** Seconds to wait before fetching Sdo dictionary
427
f70c7c6db7f4 Added EC_WAIT_SDO_DICT define.
Florian Pose <fp@igh-essen.com>
parents: 403
diff changeset
    62
    after slave entered PREOP state. */
f70c7c6db7f4 Added EC_WAIT_SDO_DICT define.
Florian Pose <fp@igh-essen.com>
parents: 403
diff changeset
    63
#define EC_WAIT_SDO_DICT 3
f70c7c6db7f4 Added EC_WAIT_SDO_DICT define.
Florian Pose <fp@igh-essen.com>
parents: 403
diff changeset
    64
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    65
/** Minimum size of a buffer used with ec_state_string(). */
453
2ecaa53c6291 Changed output of ec_state_string() for error flag to "+ ERROR".
Florian Pose <fp@igh-essen.com>
parents: 444
diff changeset
    66
#define EC_STATE_STRING_SIZE 32
403
7bb931deccd9 Added EC_SLAVE_STATE_ACK_ERR to ec_state_string(); added EC_STATE_STRING_SIZE
Florian Pose <fp@igh-essen.com>
parents: 392
diff changeset
    67
872
d4e0380d63b3 Renamed EEPROM to SII.
Florian Pose <fp@igh-essen.com>
parents: 861
diff changeset
    68
/** Maximum SII size in words, to avoid infinite reading. */
d4e0380d63b3 Renamed EEPROM to SII.
Florian Pose <fp@igh-essen.com>
parents: 861
diff changeset
    69
#define EC_MAX_SII_SIZE 1024
696
24fac09b5b26 Limited EEPROM reading; added EC_FIRST_EEPROM_CATEGORY_HEADER define.
Florian Pose <fp@igh-essen.com>
parents: 649
diff changeset
    70
196
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    71
/******************************************************************************
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    72
 * EtherCAT protocol
196
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    73
 *****************************************************************************/
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    74
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    75
/** Size of an EtherCAT frame header. */
196
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    76
#define EC_FRAME_HEADER_SIZE 2
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    77
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    78
/** Size of an EtherCAT datagram header. */
293
14aeb79aa992 Renamed command structure to datagram.
Florian Pose <fp@igh-essen.com>
parents: 259
diff changeset
    79
#define EC_DATAGRAM_HEADER_SIZE 10
196
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    80
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    81
/** Size of an EtherCAT datagram footer. */
293
14aeb79aa992 Renamed command structure to datagram.
Florian Pose <fp@igh-essen.com>
parents: 259
diff changeset
    82
#define EC_DATAGRAM_FOOTER_SIZE 2
196
f8a1e9f364a3 Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    83
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    84
/** Size of the EtherCAT address field. */
708
90bdb315f560 Fixed EtherCAT addressing problem on big-endian systems. The slaves
Florian Pose <fp@igh-essen.com>
parents: 696
diff changeset
    85
#define EC_ADDR_LEN 4
90bdb315f560 Fixed EtherCAT addressing problem on big-endian systems. The slaves
Florian Pose <fp@igh-essen.com>
parents: 696
diff changeset
    86
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
    87
/** Resulting maximum data size of a single datagram in a frame. */
211
c684b6b7adaf Using kernel Ethernet constants.
Florian Pose <fp@igh-essen.com>
parents: 199
diff changeset
    88
#define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \
293
14aeb79aa992 Renamed command structure to datagram.
Florian Pose <fp@igh-essen.com>
parents: 259
diff changeset
    89
                          - EC_DATAGRAM_HEADER_SIZE - EC_DATAGRAM_FOOTER_SIZE)
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    90
1217
e8a9785e63c3 Introduced EC_MBOX_HEADER_SIZE.
Florian Pose <fp@igh-essen.com>
parents: 1209
diff changeset
    91
/** Mailbox header size.  */
e8a9785e63c3 Introduced EC_MBOX_HEADER_SIZE.
Florian Pose <fp@igh-essen.com>
parents: 1209
diff changeset
    92
#define EC_MBOX_HEADER_SIZE 6
e8a9785e63c3 Introduced EC_MBOX_HEADER_SIZE.
Florian Pose <fp@igh-essen.com>
parents: 1209
diff changeset
    93
872
d4e0380d63b3 Renamed EEPROM to SII.
Florian Pose <fp@igh-essen.com>
parents: 861
diff changeset
    94
/** Word offset of first SII category. */
d4e0380d63b3 Renamed EEPROM to SII.
Florian Pose <fp@igh-essen.com>
parents: 861
diff changeset
    95
#define EC_FIRST_SII_CATEGORY_OFFSET 0x40
696
24fac09b5b26 Limited EEPROM reading; added EC_FIRST_EEPROM_CATEGORY_HEADER define.
Florian Pose <fp@igh-essen.com>
parents: 649
diff changeset
    96
1055
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1000
diff changeset
    97
/** Maximum number of slave ports. */
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1000
diff changeset
    98
#define EC_MAX_PORTS 4
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 1000
diff changeset
    99
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   100
/** Size of a sync manager configuration page. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   101
#define EC_SYNC_PAGE_SIZE 8
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   102
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   103
/** Maximum number of FMMUs per slave. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   104
#define EC_MAX_FMMUS 16
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   105
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   106
/** Size of an FMMU configuration page. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   107
#define EC_FMMU_PAGE_SIZE 16
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   108
989
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   109
/** Slave state mask.
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   110
 *
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   111
 * Apply this mask to a slave state byte to get the slave state without
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   112
 * the error flag.
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   113
 */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   114
#define EC_SLAVE_STATE_MASK 0x0F
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   115
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   116
/** State of an EtherCAT slave.
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   117
 */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   118
typedef enum {
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   119
    EC_SLAVE_STATE_UNKNOWN = 0x00,
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   120
    /**< unknown state */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   121
    EC_SLAVE_STATE_INIT = 0x01,
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   122
    /**< INIT state (no mailbox communication, no IO) */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   123
    EC_SLAVE_STATE_PREOP = 0x02,
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   124
    /**< PREOP state (mailbox communication, no IO) */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   125
    EC_SLAVE_STATE_SAFEOP = 0x04,
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   126
    /**< SAFEOP (mailbox communication and input update) */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   127
    EC_SLAVE_STATE_OP = 0x08,
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   128
    /**< OP (mailbox communication and input/output update) */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   129
    EC_SLAVE_STATE_ACK_ERR = 0x10
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   130
    /**< Acknowledge/Error bit (no actual state) */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   131
} ec_slave_state_t;
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   132
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   133
/** Supported mailbox protocols.
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   134
 */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   135
enum {
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   136
    EC_MBOX_AOE = 0x01, /**< ADS-over-EtherCAT */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   137
    EC_MBOX_EOE = 0x02, /**< Ethernet-over-EtherCAT */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   138
    EC_MBOX_COE = 0x04, /**< CANopen-over-EtherCAT */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   139
    EC_MBOX_FOE = 0x08, /**< File-Access-over-EtherCAT */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   140
    EC_MBOX_SOE = 0x10, /**< Servo-Profile-over-EtherCAT */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   141
    EC_MBOX_VOE = 0x20  /**< Vendor specific */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   142
};
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   143
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   144
/** Slave information interface CANopen-over-EtherCAT details flags.
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   145
 */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   146
typedef struct {
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   147
    uint8_t enable_sdo : 1; /**< Enable Sdo access. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   148
    uint8_t enable_sdo_info : 1; /**< SDO information service available. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   149
    uint8_t enable_pdo_assign : 1; /**< Pdo mapping configurable. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   150
    uint8_t enable_pdo_configuration : 1; /**< Pdo configuration possible. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   151
    uint8_t enable_upload_at_startup : 1; /**< ?. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   152
    uint8_t enable_sdo_complete_access : 1; /**< Complete access possible. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   153
} ec_sii_coe_details_t;
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   154
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   155
/** Slave information interface general flags.
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   156
 */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   157
typedef struct {
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   158
    uint8_t enable_safeop : 1; /**< ?. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   159
    uint8_t enable_not_lrw : 1; /**< Slave does not support LRW. */
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   160
} ec_sii_general_flags_t;
816663ca9370 Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents: 883
diff changeset
   161
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   162
/*****************************************************************************/
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   163
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   164
/** Convenience macro for printing EtherCAT-specific information to syslog.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   165
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   166
 * This will print the message in \a fmt with a prefixed "EtherCAT: ".
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   167
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   168
 * \param fmt format string (like in printf())
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   169
 * \param args arguments (optional)
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   170
 */
84
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   171
#define EC_INFO(fmt, args...) \
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   172
    printk(KERN_INFO "EtherCAT: " fmt, ##args)
259
87b20532872b Added some documentation.
Florian Pose <fp@igh-essen.com>
parents: 256
diff changeset
   173
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   174
/** Convenience macro for printing EtherCAT-specific errors to syslog.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   175
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   176
 * This will print the message in \a fmt with a prefixed "EtherCAT ERROR: ".
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   177
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   178
 * \param fmt format string (like in printf())
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   179
 * \param args arguments (optional)
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   180
 */
84
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   181
#define EC_ERR(fmt, args...) \
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   182
    printk(KERN_ERR "EtherCAT ERROR: " fmt, ##args)
259
87b20532872b Added some documentation.
Florian Pose <fp@igh-essen.com>
parents: 256
diff changeset
   183
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   184
/** Convenience macro for printing EtherCAT-specific warnings to syslog.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   185
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   186
 * This will print the message in \a fmt with a prefixed "EtherCAT WARNING: ".
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   187
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   188
 * \param fmt format string (like in printf())
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   189
 * \param args arguments (optional)
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   190
 */
84
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   191
#define EC_WARN(fmt, args...) \
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   192
    printk(KERN_WARNING "EtherCAT WARNING: " fmt, ##args)
259
87b20532872b Added some documentation.
Florian Pose <fp@igh-essen.com>
parents: 256
diff changeset
   193
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   194
/** Convenience macro for printing EtherCAT debug messages to syslog.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   195
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   196
 * This will print the message in \a fmt with a prefixed "EtherCAT DEBUG: ".
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   197
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   198
 * \param fmt format string (like in printf())
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   199
 * \param args arguments (optional)
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   200
 */
84
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   201
#define EC_DBG(fmt, args...) \
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   202
    printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args)
b4ae98855cea printk durch Makros ersetzt.
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
   203
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   204
/** Convenience macro for defining read-only SysFS attributes.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   205
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   206
 * This results in creating a static variable called attr_\a NAME. The SysFS
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   207
 * file will be world-readable.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   208
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   209
 * \param NAME name of the attribute to create.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   210
 */
184
2fc86cec12df Macro for SysFS attribute definition
Florian Pose <fp@igh-essen.com>
parents: 164
diff changeset
   211
#define EC_SYSFS_READ_ATTR(NAME) \
2fc86cec12df Macro for SysFS attribute definition
Florian Pose <fp@igh-essen.com>
parents: 164
diff changeset
   212
    static struct attribute attr_##NAME = { \
2fc86cec12df Macro for SysFS attribute definition
Florian Pose <fp@igh-essen.com>
parents: 164
diff changeset
   213
        .name = EC_STR(NAME), .owner = THIS_MODULE, .mode = S_IRUGO \
2fc86cec12df Macro for SysFS attribute definition
Florian Pose <fp@igh-essen.com>
parents: 164
diff changeset
   214
    }
2fc86cec12df Macro for SysFS attribute definition
Florian Pose <fp@igh-essen.com>
parents: 164
diff changeset
   215
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   216
/** Convenience macro for defining read-write SysFS attributes.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   217
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   218
 * This results in creating a static variable called attr_\a NAME. The SysFS
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   219
 * file will be word-readable plus owner-writable.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   220
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   221
 * \param NAME name of the attribute to create.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   222
 */
256
dc71aee17f8a SysFS write access for slave state.
Florian Pose <fp@igh-essen.com>
parents: 251
diff changeset
   223
#define EC_SYSFS_READ_WRITE_ATTR(NAME) \
dc71aee17f8a SysFS write access for slave state.
Florian Pose <fp@igh-essen.com>
parents: 251
diff changeset
   224
    static struct attribute attr_##NAME = { \
dc71aee17f8a SysFS write access for slave state.
Florian Pose <fp@igh-essen.com>
parents: 251
diff changeset
   225
        .name = EC_STR(NAME), .owner = THIS_MODULE, .mode = S_IRUGO | S_IWUSR \
dc71aee17f8a SysFS write access for slave state.
Florian Pose <fp@igh-essen.com>
parents: 251
diff changeset
   226
    }
dc71aee17f8a SysFS write access for slave state.
Florian Pose <fp@igh-essen.com>
parents: 251
diff changeset
   227
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 39
diff changeset
   228
/*****************************************************************************/
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 39
diff changeset
   229
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 427
diff changeset
   230
extern char *ec_master_version_str;
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 427
diff changeset
   231
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 427
diff changeset
   232
/*****************************************************************************/
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 427
diff changeset
   233
325
7833cf70c4f2 VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents: 293
diff changeset
   234
void ec_print_data(const uint8_t *, size_t);
7833cf70c4f2 VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents: 293
diff changeset
   235
void ec_print_data_diff(const uint8_t *, const uint8_t *, size_t);
7833cf70c4f2 VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents: 293
diff changeset
   236
size_t ec_state_string(uint8_t, char *);
639
aa23c48dca2d Allow only MAC addresses as device identifiers; replaced master list by
Florian Pose <fp@igh-essen.com>
parents: 630
diff changeset
   237
ssize_t ec_mac_print(const uint8_t *, char *);
aa23c48dca2d Allow only MAC addresses as device identifiers; replaced master list by
Florian Pose <fp@igh-essen.com>
parents: 630
diff changeset
   238
int ec_mac_is_zero(const uint8_t *);
152
9654f3cf588d Plugfest: Globale Debug-Funktionen f?r Frame-Daten.
Florian Pose <fp@igh-essen.com>
parents: 141
diff changeset
   239
9654f3cf588d Plugfest: Globale Debug-Funktionen f?r Frame-Daten.
Florian Pose <fp@igh-essen.com>
parents: 141
diff changeset
   240
/*****************************************************************************/
9654f3cf588d Plugfest: Globale Debug-Funktionen f?r Frame-Daten.
Florian Pose <fp@igh-essen.com>
parents: 141
diff changeset
   241
809
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   242
/** Code/Message pair.
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   243
 *
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   244
 * Some EtherCAT datagrams support reading a status code to display a certain
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   245
 * message. This type allows to map a code to a message string.
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   246
 */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   247
typedef struct {
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   248
    uint32_t code; /**< Code. */
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   249
    const char *message; /**< Message belonging to \a code. */
809
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   250
} ec_code_msg_t;
164
ed85368b2b2e AL status code reading after failed state transition.
Florian Pose <fp@igh-essen.com>
parents: 152
diff changeset
   251
ed85368b2b2e AL status code reading after failed state transition.
Florian Pose <fp@igh-essen.com>
parents: 152
diff changeset
   252
/*****************************************************************************/
ed85368b2b2e AL status code reading after failed state transition.
Florian Pose <fp@igh-essen.com>
parents: 152
diff changeset
   253
861
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   254
/** Generic request state.
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   255
 *
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   256
 * \attention If ever changing this, please be sure to adjust the \a
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   257
 * state_table in master/sdo_request.c.
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   258
 */
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   259
typedef enum {
1209
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   260
    EC_INT_REQUEST_INIT,
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   261
    EC_INT_REQUEST_QUEUED,
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   262
    EC_INT_REQUEST_BUSY,
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   263
    EC_INT_REQUEST_SUCCESS,
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   264
    EC_INT_REQUEST_FAILURE
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   265
} ec_internal_request_state_t;
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   266
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   267
/*****************************************************************************/
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   268
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1082
diff changeset
   269
extern const ec_request_state_t ec_request_state_translation_table[];
861
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   270
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   271
/*****************************************************************************/
6e3de145421a Introduced ec_sdo_request_state_t, making ec_request_t private again;
Florian Pose <fp@igh-essen.com>
parents: 858
diff changeset
   272
809
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   273
/** Origin type.
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   274
 */
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   275
typedef enum {
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   276
    EC_ORIG_INTERNAL, /**< Internal. */
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   277
    EC_ORIG_EXTERNAL /**< External. */
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   278
} ec_origin_t;
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   279
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   280
/*****************************************************************************/
ec4ef8911824 External domain memory.
Florian Pose <fp@igh-essen.com>
parents: 792
diff changeset
   281
792
3778920f61e4 Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents: 773
diff changeset
   282
typedef struct ec_slave ec_slave_t; /**< \see ec_slave. */
740
68d83b45dfa2 Added ec_slave_get_sdo() and ec_sdo_get_entry().
Florian Pose <fp@igh-essen.com>
parents: 708
diff changeset
   283
68d83b45dfa2 Added ec_slave_get_sdo() and ec_sdo_get_entry().
Florian Pose <fp@igh-essen.com>
parents: 708
diff changeset
   284
/*****************************************************************************/
68d83b45dfa2 Added ec_slave_get_sdo() and ec_sdo_get_entry().
Florian Pose <fp@igh-essen.com>
parents: 708
diff changeset
   285
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   286
#endif