examples/mini/mini.c
author Florian Pose <fp@igh-essen.com>
Thu, 04 Oct 2007 08:43:47 +0000
branchstable-1.3
changeset 1750 c916f48c95dd
parent 1744 7bc131b92039
permissions -rw-r--r--
Removed mydist target.
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
/******************************************************************************
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
 *  $Id$
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
 *
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
 *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
 *
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
 *  This file is part of the IgH EtherCAT Master.
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
 *
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
 *  The IgH EtherCAT Master is free software; you can redistribute it
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
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: 226
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: 226
diff changeset
    12
 *  License, or (at your option) any later version.
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
 *
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
 *  The IgH EtherCAT Master is distributed in the hope that it will be
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
 *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
 *  GNU General Public License for more details.
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
 *
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
 *  You should have received a copy of the GNU General Public License
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
 *  along with the IgH EtherCAT Master; if not, write to the Free Software
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
 *
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 226
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: 226
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: 226
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: 226
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: 226
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: 226
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: 226
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: 226
diff changeset
    30
 *  Technology, IP and trade marks.
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 226
diff changeset
    31
 *
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
 *****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
#include <linux/module.h>
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
#include <linux/timer.h>
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
#include <linux/spinlock.h>
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
#include <linux/interrupt.h>
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
223
daa5e5656b35 Applied new path information to example modules.
Florian Pose <fp@igh-essen.com>
parents: 220
diff changeset
    39
#include "../../include/ecrt.h" // EtherCAT realtime interface
1715
e675450f2174 MERGE trunk -r463:494 -> branches/stable-1.1 (Version 1.1)
Florian Pose <fp@igh-essen.com>
parents: 280
diff changeset
    40
#include "../../include/ecdb.h" // EtherCAT slave database
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    42
#define PFX "ec_mini: "
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    43
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
#define FREQUENCY 100
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
    46
//#define KBUS
1732
1cc865ba17c2 MERGE trunk -r588:681 -> branches/stable-1.1 (Bugfixes, Ack behaviour, CoE via Sysfs, PDO ranges, 2.6.17 support, improved autotools, documentation)
Florian Pose <fp@igh-essen.com>
parents: 1719
diff changeset
    47
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
/*****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    50
static struct timer_list timer;
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
// EtherCAT
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    53
static ec_master_t *master = NULL;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    54
static ec_domain_t *domain1 = NULL;
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    55
spinlock_t master_lock = SPIN_LOCK_UNLOCKED;
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    56
static ec_master_status_t master_status, old_status = {};
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
// data fields
1732
1cc865ba17c2 MERGE trunk -r588:681 -> branches/stable-1.1 (Bugfixes, Ack behaviour, CoE via Sysfs, PDO ranges, 2.6.17 support, improved autotools, documentation)
Florian Pose <fp@igh-essen.com>
parents: 1719
diff changeset
    59
#ifdef KBUS
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    60
static void *r_inputs;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    61
static void *r_outputs;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    62
#endif
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    63
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    64
static void *r_dig_out;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    65
static void *r_ana_out;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    66
static void *r_count;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    67
static void *r_freq;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    68
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    69
#if 1
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    70
const static ec_pdo_reg_t domain1_pdo_regs[] = {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    71
    {"2",      Beckhoff_EL2004_Outputs,   &r_dig_out},
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    72
    {"3",      Beckhoff_EL4132_Output1,   &r_ana_out},
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    73
    {"#888:1", Beckhoff_EL5101_Value,     &r_count},
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
    74
    {"4",      Beckhoff_EL5101_Frequency, &r_freq},
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    75
    {}
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    76
};
1732
1cc865ba17c2 MERGE trunk -r588:681 -> branches/stable-1.1 (Bugfixes, Ack behaviour, CoE via Sysfs, PDO ranges, 2.6.17 support, improved autotools, documentation)
Florian Pose <fp@igh-essen.com>
parents: 1719
diff changeset
    77
#endif
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    78
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    79
/*****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    80
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    81
void run(unsigned long data)
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    82
{
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    83
    static unsigned int counter = 0;
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
    84
    static unsigned int blink = 0;
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    85
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    86
    // receive
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
    87
    spin_lock(&master_lock);
1715
e675450f2174 MERGE trunk -r463:494 -> branches/stable-1.1 (Version 1.1)
Florian Pose <fp@igh-essen.com>
parents: 280
diff changeset
    88
    ecrt_master_receive(master);
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    89
    ecrt_domain_process(domain1);
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
    90
    spin_unlock(&master_lock);
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    91
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    92
    // process data
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
    93
    // k_pos = EC_READ_U32(r_ssi);
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
    94
    EC_WRITE_U8(r_dig_out, blink ? 0x0F : 0x00);
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    95
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    96
    if (counter) {
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    97
        counter--;
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    98
    }
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    99
    else {
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   100
        counter = FREQUENCY;
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   101
        blink = !blink;
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   102
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   103
        spin_lock(&master_lock);
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   104
        ecrt_master_get_status(master, &master_status);
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   105
        spin_unlock(&master_lock);
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   106
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   107
        if (master_status.bus_status != old_status.bus_status) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   108
            printk(KERN_INFO PFX "bus status changed to %i.\n",
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   109
                    master_status.bus_status);
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   110
        }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   111
        if (master_status.bus_tainted != old_status.bus_tainted) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   112
            printk(KERN_INFO PFX "tainted flag changed to %u.\n",
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   113
                    master_status.bus_tainted);
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   114
        }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   115
        if (master_status.slaves_responding !=
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   116
                old_status.slaves_responding) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   117
            printk(KERN_INFO PFX "slaves_responding changed to %u.\n",
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   118
                    master_status.slaves_responding);
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   119
        }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   120
       
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   121
        old_status = master_status;
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   122
    }
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   123
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   124
#ifdef KBUS
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   125
    EC_WRITE_U8(r_outputs + 2, blink ? 0xFF : 0x00);
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   126
#endif
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   127
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   128
    // send
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   129
    spin_lock(&master_lock);
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   130
    ecrt_domain_queue(domain1);
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   131
    spin_unlock(&master_lock);
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   132
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   133
    spin_lock(&master_lock);
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   134
    ecrt_master_send(master);
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   135
    spin_unlock(&master_lock);
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   136
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   137
    // restart timer
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   138
    timer.expires += HZ / FREQUENCY;
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   139
    add_timer(&timer);
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   140
}
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   141
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   142
/*****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   143
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   144
int request_lock(void *data)
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   145
{
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   146
    spin_lock(&master_lock);
226
07247920a7ba EoE with workqueue; bugfix in ec_master_init()
Florian Pose <fp@igh-essen.com>
parents: 223
diff changeset
   147
    return 0; // access allowed
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   148
}
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   149
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   150
/*****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   151
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   152
void release_lock(void *data)
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   153
{
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   154
    spin_unlock(&master_lock);
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   155
}
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   156
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   157
/*****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   158
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   159
int __init init_mini_module(void)
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   160
{
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   161
#if 1
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   162
    ec_slave_t *slave;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   163
#endif
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   164
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   165
    printk(KERN_INFO PFX "Starting...\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   166
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   167
    if (!(master = ecrt_request_master(0))) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   168
        printk(KERN_ERR PFX "Requesting master 0 failed!\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   169
        goto out_return;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   170
    }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   171
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   172
    ecrt_master_callbacks(master, request_lock, release_lock, NULL);
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   173
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   174
    printk(KERN_INFO PFX "Registering domain...\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   175
    if (!(domain1 = ecrt_master_create_domain(master))) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   176
        printk(KERN_ERR PFX "Domain creation failed!\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   177
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   178
    }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   179
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   180
#if 1
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   181
    printk(KERN_INFO PFX "Configuring alternative PDO mapping...\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   182
    if (!(slave = ecrt_master_get_slave(master, "4", Beckhoff_EL5101)))
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   183
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   184
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   185
    if (ecrt_slave_pdo_mapping(slave, EC_DIR_INPUT, 2, 0x1A00, 0x1A02))
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   186
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   187
#endif
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   188
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   189
    printk(KERN_INFO PFX "Registering PDOs...\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   190
#if 1
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   191
    if (ecrt_domain_register_pdo_list(domain1, domain1_pdo_regs)) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   192
        printk(KERN_ERR PFX "PDO registration failed!\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   193
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   194
    }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   195
#endif
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   196
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   197
#ifdef KBUS
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   198
    if (!(slave = ecrt_master_get_slave(master, "0", Beckhoff_BK1120)))
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   199
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   200
    
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   201
    if (!ecrt_domain_register_pdo_range(
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   202
                domain1, slave, EC_DIR_OUTPUT, 0, 4, &r_outputs)) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   203
        printk(KERN_ERR PFX "PDO registration failed!\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   204
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   205
    }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   206
    
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   207
    if (!ecrt_domain_register_pdo_range(
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   208
                domain1, slave, EC_DIR_INPUT, 0, 4, &r_inputs)) {
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   209
        printk(KERN_ERR PFX "PDO registration failed!\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   210
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   211
    }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   212
#endif
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   213
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   214
#if 0
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   215
    if (!(slave = ecrt_master_get_slave(master, "4", Beckhoff_EL5001)))
1716
9440f4ff25c7 MERGE trunk -r494:513 -> branches/stable-1.1 (SDO configuration, bugfixes, EoE frame rates)
Florian Pose <fp@igh-essen.com>
parents: 1715
diff changeset
   216
        goto out_release_master;
9440f4ff25c7 MERGE trunk -r494:513 -> branches/stable-1.1 (SDO configuration, bugfixes, EoE frame rates)
Florian Pose <fp@igh-essen.com>
parents: 1715
diff changeset
   217
9440f4ff25c7 MERGE trunk -r494:513 -> branches/stable-1.1 (SDO configuration, bugfixes, EoE frame rates)
Florian Pose <fp@igh-essen.com>
parents: 1715
diff changeset
   218
    if (ecrt_slave_conf_sdo8(slave, 0x4061, 1, 0))
9440f4ff25c7 MERGE trunk -r494:513 -> branches/stable-1.1 (SDO configuration, bugfixes, EoE frame rates)
Florian Pose <fp@igh-essen.com>
parents: 1715
diff changeset
   219
        goto out_release_master;
1732
1cc865ba17c2 MERGE trunk -r588:681 -> branches/stable-1.1 (Bugfixes, Ack behaviour, CoE via Sysfs, PDO ranges, 2.6.17 support, improved autotools, documentation)
Florian Pose <fp@igh-essen.com>
parents: 1719
diff changeset
   220
#endif
1716
9440f4ff25c7 MERGE trunk -r494:513 -> branches/stable-1.1 (SDO configuration, bugfixes, EoE frame rates)
Florian Pose <fp@igh-essen.com>
parents: 1715
diff changeset
   221
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   222
#if 1
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   223
#endif
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   224
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   225
    printk(KERN_INFO PFX "Activating master...\n");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   226
    if (ecrt_master_activate(master)) {
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   227
        printk(KERN_ERR PFX "Failed to activate master!\n");
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   228
        goto out_release_master;
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   229
    }
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   230
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   231
    printk(KERN_INFO PFX "Starting cyclic sample thread.\n");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   232
    init_timer(&timer);
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   233
    timer.function = run;
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   234
    timer.expires = jiffies + 10;
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   235
    add_timer(&timer);
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   236
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   237
    printk(KERN_INFO PFX "Started.\n");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   238
    return 0;
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   239
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   240
 out_release_master:
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   241
    printk(KERN_ERR PFX "Releasing master...\n");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   242
    ecrt_release_master(master);
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   243
 out_return:
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   244
    printk(KERN_ERR PFX "Failed to load. Aborting.\n");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   245
    return -1;
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   246
}
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   247
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   248
/*****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   249
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   250
void __exit cleanup_mini_module(void)
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   251
{
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   252
    printk(KERN_INFO PFX "Stopping...\n");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   253
1732
1cc865ba17c2 MERGE trunk -r588:681 -> branches/stable-1.1 (Bugfixes, Ack behaviour, CoE via Sysfs, PDO ranges, 2.6.17 support, improved autotools, documentation)
Florian Pose <fp@igh-essen.com>
parents: 1719
diff changeset
   254
    del_timer_sync(&timer);
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   255
    printk(KERN_INFO PFX "Releasing master...\n");
1732
1cc865ba17c2 MERGE trunk -r588:681 -> branches/stable-1.1 (Bugfixes, Ack behaviour, CoE via Sysfs, PDO ranges, 2.6.17 support, improved autotools, documentation)
Florian Pose <fp@igh-essen.com>
parents: 1719
diff changeset
   256
    ecrt_release_master(master);
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   257
1744
7bc131b92039 MERGE trunk -r770:907 -> branches-1.3 (1.3 changes)
Florian Pose <fp@igh-essen.com>
parents: 1739
diff changeset
   258
    printk(KERN_INFO PFX "Unloading.\n");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   259
}
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   260
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   261
/*****************************************************************************/
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   262
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   263
MODULE_LICENSE("GPL");
1739
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   264
MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>");
5fcbd29151d2 MERGE -r688:759 trunk -> branches/stable-1.2 (release 1.2, part one).
Florian Pose <fp@igh-essen.com>
parents: 1732
diff changeset
   265
MODULE_DESCRIPTION("EtherCAT minimal test environment");
220
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   266
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   267
module_init(init_mini_module);
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   268
module_exit(cleanup_mini_module);
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   269
342ad851ec78 Added examples directory.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   270
/*****************************************************************************/