1565
|
1 |
/******************************************************************************
|
|
2 |
*
|
|
3 |
* $Id$
|
|
4 |
*
|
|
5 |
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
|
|
6 |
*
|
|
7 |
* This file is part of the IgH EtherCAT Master.
|
|
8 |
*
|
|
9 |
* The IgH EtherCAT Master is free software; you can redistribute it and/or
|
|
10 |
* modify it under the terms of the GNU General Public License version 2, as
|
|
11 |
* published by the Free Software Foundation.
|
|
12 |
*
|
|
13 |
* The IgH EtherCAT Master is distributed in the hope that it will be useful,
|
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
16 |
* Public License for more details.
|
|
17 |
*
|
|
18 |
* You should have received a copy of the GNU General Public License along
|
|
19 |
* with the IgH EtherCAT Master; if not, write to the Free Software
|
|
20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21 |
*
|
|
22 |
* ---
|
|
23 |
*
|
|
24 |
* The license mentioned above concerns the source code only. Using the
|
|
25 |
* EtherCAT technology and brand is only permitted in compliance with the
|
|
26 |
* industrial property and similar rights of Beckhoff Automation GmbH.
|
|
27 |
*
|
|
28 |
*****************************************************************************/
|
|
29 |
|
|
30 |
/** \file
|
|
31 |
* EtherCAT tty driver module.
|
|
32 |
*/
|
|
33 |
|
|
34 |
/*****************************************************************************/
|
|
35 |
|
|
36 |
#include <linux/module.h>
|
|
37 |
#include <linux/err.h>
|
|
38 |
|
|
39 |
#include "../master/globals.h"
|
|
40 |
|
|
41 |
/*****************************************************************************/
|
|
42 |
|
|
43 |
int __init ec_tty_init_module(void);
|
|
44 |
void __exit ec_tty_cleanup_module(void);
|
|
45 |
|
|
46 |
unsigned int debug_level = 0;
|
|
47 |
char *ec_master_version_str = EC_MASTER_VERSION; /**< Version string. */
|
|
48 |
|
|
49 |
/*****************************************************************************/
|
|
50 |
|
|
51 |
/** \cond */
|
|
52 |
|
|
53 |
MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>");
|
|
54 |
MODULE_DESCRIPTION("EtherCAT TTY driver module");
|
|
55 |
MODULE_LICENSE("GPL");
|
|
56 |
MODULE_VERSION(EC_MASTER_VERSION);
|
|
57 |
|
|
58 |
module_param_named(debug_level, debug_level, uint, S_IRUGO);
|
|
59 |
MODULE_PARM_DESC(debug_level, "Debug level");
|
|
60 |
|
|
61 |
/** \endcond */
|
|
62 |
|
|
63 |
/*****************************************************************************/
|
|
64 |
|
|
65 |
/** Module initialization.
|
|
66 |
*
|
|
67 |
* \return 0 on success, else < 0
|
|
68 |
*/
|
|
69 |
int __init ec_tty_init_module(void)
|
|
70 |
{
|
|
71 |
int ret = 0;
|
|
72 |
|
|
73 |
EC_INFO("TTY driver %s\n", EC_MASTER_VERSION);
|
|
74 |
|
|
75 |
return ret;
|
|
76 |
}
|
|
77 |
|
|
78 |
/*****************************************************************************/
|
|
79 |
|
|
80 |
/** Module cleanup.
|
|
81 |
*
|
|
82 |
* Clears all master instances.
|
|
83 |
*/
|
|
84 |
void __exit ec_tty_cleanup_module(void)
|
|
85 |
{
|
|
86 |
EC_INFO("TTY module cleaned up.\n");
|
|
87 |
}
|
|
88 |
|
|
89 |
/*****************************************************************************/
|
|
90 |
|
|
91 |
/** \cond */
|
|
92 |
|
|
93 |
module_init(ec_tty_init_module);
|
|
94 |
module_exit(ec_tty_cleanup_module);
|
|
95 |
|
|
96 |
/** \endcond */
|
|
97 |
|
|
98 |
/*****************************************************************************/
|