equal
deleted
inserted
replaced
1 /****************************************************************************** |
1 /****************************************************************************** |
2 * |
|
3 * e t h e r n e t . c |
|
4 * |
|
5 * Ethernet-over-EtherCAT (EoE) |
|
6 * |
2 * |
7 * $Id$ |
3 * $Id$ |
8 * |
4 * |
9 * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
5 * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
10 * |
6 * |
23 * along with the IgH EtherCAT Master; if not, write to the Free Software |
19 * 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 |
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
25 * |
21 * |
26 *****************************************************************************/ |
22 *****************************************************************************/ |
27 |
23 |
|
24 /** |
|
25 \file |
|
26 Ethernet-over-EtherCAT (EoE). |
|
27 */ |
|
28 |
|
29 /*****************************************************************************/ |
|
30 |
28 #include "../include/ecrt.h" |
31 #include "../include/ecrt.h" |
29 #include "globals.h" |
32 #include "globals.h" |
30 #include "master.h" |
33 #include "master.h" |
31 #include "slave.h" |
34 #include "slave.h" |
32 #include "mailbox.h" |
35 #include "mailbox.h" |
33 #include "ethernet.h" |
36 #include "ethernet.h" |
34 |
37 |
35 /*****************************************************************************/ |
38 /*****************************************************************************/ |
36 |
39 |
37 /** |
40 /** |
38 \ingroup EoE |
41 EoE constructor. |
39 */ |
42 */ |
40 |
43 |
41 void ec_eoe_init(ec_eoe_t *eoe, ec_slave_t *slave) |
44 void ec_eoe_init(ec_eoe_t *eoe, ec_slave_t *slave) |
42 { |
45 { |
43 eoe->slave = slave; |
46 eoe->slave = slave; |
45 } |
48 } |
46 |
49 |
47 /*****************************************************************************/ |
50 /*****************************************************************************/ |
48 |
51 |
49 /** |
52 /** |
50 \ingroup EoE |
53 EoE destructor. |
51 */ |
54 */ |
52 |
55 |
53 void ec_eoe_clear(ec_eoe_t *eoe) |
56 void ec_eoe_clear(ec_eoe_t *eoe) |
54 { |
57 { |
55 } |
58 } |
56 |
59 |
57 /*****************************************************************************/ |
60 /*****************************************************************************/ |
58 |
61 |
59 /** |
62 /** |
60 \ingroup EoE |
63 Runs the EoE state machine. |
61 */ |
64 */ |
62 |
65 |
63 void ec_eoe_run(ec_eoe_t *eoe) |
66 void ec_eoe_run(ec_eoe_t *eoe) |
64 { |
67 { |
65 uint8_t *data; |
68 uint8_t *data; |
138 } |
141 } |
139 |
142 |
140 /*****************************************************************************/ |
143 /*****************************************************************************/ |
141 |
144 |
142 /** |
145 /** |
143 \ingroup EoE |
146 Prints EoE object information. |
144 */ |
147 */ |
145 |
148 |
146 void ec_eoe_print(const ec_eoe_t *eoe) |
149 void ec_eoe_print(const ec_eoe_t *eoe) |
147 { |
150 { |
148 EC_INFO(" EoE slave %i\n", eoe->slave->ring_position); |
151 EC_INFO(" EoE slave %i\n", eoe->slave->ring_position); |