equal
deleted
inserted
replaced
3 * e t h e r n e t . c |
3 * e t h e r n e t . c |
4 * |
4 * |
5 * Ethernet-over-EtherCAT (EoE) |
5 * Ethernet-over-EtherCAT (EoE) |
6 * |
6 * |
7 * $Id$ |
7 * $Id$ |
|
8 * |
|
9 * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
|
10 * |
|
11 * This file is part of the IgH EtherCAT Master. |
|
12 * |
|
13 * The IgH EtherCAT Master is free software; you can redistribute it |
|
14 * and/or modify it under the terms of the GNU General Public License |
|
15 * as published by the Free Software Foundation; version 2 of the License. |
|
16 * |
|
17 * The IgH EtherCAT Master is distributed in the hope that it will be |
|
18 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 * GNU General Public License for more details. |
|
21 * |
|
22 * You should have received a copy of the GNU General Public License |
|
23 * along with the IgH EtherCAT Master; if not, write to the Free Software |
|
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
8 * |
25 * |
9 *****************************************************************************/ |
26 *****************************************************************************/ |
10 |
27 |
11 #include "../include/ecrt.h" |
28 #include "../include/ecrt.h" |
12 #include "globals.h" |
29 #include "globals.h" |
15 #include "mailbox.h" |
32 #include "mailbox.h" |
16 #include "ethernet.h" |
33 #include "ethernet.h" |
17 |
34 |
18 /*****************************************************************************/ |
35 /*****************************************************************************/ |
19 |
36 |
|
37 /** |
|
38 \ingroup EoE |
|
39 */ |
|
40 |
20 void ec_eoe_init(ec_eoe_t *eoe, ec_slave_t *slave) |
41 void ec_eoe_init(ec_eoe_t *eoe, ec_slave_t *slave) |
21 { |
42 { |
22 eoe->slave = slave; |
43 eoe->slave = slave; |
23 eoe->rx_state = EC_EOE_IDLE; |
44 eoe->rx_state = EC_EOE_IDLE; |
24 } |
45 } |
25 |
46 |
26 /*****************************************************************************/ |
47 /*****************************************************************************/ |
27 |
48 |
|
49 /** |
|
50 \ingroup EoE |
|
51 */ |
|
52 |
28 void ec_eoe_clear(ec_eoe_t *eoe) |
53 void ec_eoe_clear(ec_eoe_t *eoe) |
29 { |
54 { |
30 } |
55 } |
31 |
56 |
32 /*****************************************************************************/ |
57 /*****************************************************************************/ |
|
58 |
|
59 /** |
|
60 \ingroup EoE |
|
61 */ |
33 |
62 |
34 void ec_eoe_run(ec_eoe_t *eoe) |
63 void ec_eoe_run(ec_eoe_t *eoe) |
35 { |
64 { |
36 uint8_t *data; |
65 uint8_t *data; |
37 ec_master_t *master; |
66 ec_master_t *master; |
108 } |
137 } |
109 } |
138 } |
110 |
139 |
111 /*****************************************************************************/ |
140 /*****************************************************************************/ |
112 |
141 |
|
142 /** |
|
143 \ingroup EoE |
|
144 */ |
|
145 |
113 void ec_eoe_print(const ec_eoe_t *eoe) |
146 void ec_eoe_print(const ec_eoe_t *eoe) |
114 { |
147 { |
115 EC_INFO(" EoE slave %i\n", eoe->slave->ring_position); |
148 EC_INFO(" EoE slave %i\n", eoe->slave->ring_position); |
116 EC_INFO(" RX State %i\n", eoe->rx_state); |
149 EC_INFO(" RX State %i\n", eoe->rx_state); |
117 } |
150 } |